Closed Bug 760680 Opened 12 years ago Closed 12 years ago

Update shell integration default browser check for Windows 8

Categories

(Firefox :: Shell Integration, defect)

x86_64
Windows 8
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 16

People

(Reporter: jimm, Assigned: bbondy)

References

Details

Attachments

(1 file, 1 obsolete file)

Our current methods do not detect this properly. The shell code will need to be updated.
Assignee: nobody → netzen
I think the way to fix this is to check the ProgId for the default protocol in nsWindowsShellService::IsDefaultBrowserVista via IApplicationAssociationRegistration::QueryCurrentDefault
Attached patch Patch v1. (obsolete) — Splinter Review
This review request is to land directly on m-c.
Registering http implies https by the way. 

It pops up the same select browser window as when you install.  The pref UI doesn't change at all. If you don't select Firefox in the popup it will not update the pref UI saying you set the default (I.e. it works correctly).
Attachment #630310 - Flags: review?(jmathies)
Comment on attachment 630310 [details] [diff] [review]
Patch v1.

Review of attachment 630310 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/components/shell/src/nsWindowsShellService.cpp
@@ +582,5 @@
> +    info.pcszClass = NULL;
> +    info.oaifInFlags = OAIF_FORCE_REGISTRATION | 
> +                       OAIF_URL_PROTOCOL |
> +                       OAIF_REGISTER_EXT;
> +    if FAILED(SHOpenWithDialog(NULL, &info)) {

This api is Vista and up, we'll need to use GetProcAddress to avoid xp problems. :/

http://msdn.microsoft.com/en-us/library/windows/desktop/bb762234(v=vs.85).aspx

With a NULL parent window handle, are there any focus issues with the main fx desktop window?
Attachment #630310 - Flags: review?(jmathies) → review-
Attached patch Patch v2Splinter Review
Fixed the dynamic load.

We don't need to specify an HWND because the defaults dialog is dismissed automatically when focus is lost anyway.  The call is blocking though in that the next line of code will not execute until the window loses focus or a selection is made.

I haven't pushed to try yet by the way but will before landing.
Attachment #630310 - Attachment is obsolete: true
Attachment #630601 - Flags: review?(jmathies)
Comment on attachment 630601 [details] [diff] [review]
Patch v2

Hrm, modal dialog calls are best avoided, but if the call throws up the right looking win8 interface I suppose it's worth it the risk.
Attachment #630601 - Flags: review?(jmathies) → review+
https://hg.mozilla.org/mozilla-central/rev/9399394d8f32
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Depends on: 764515
Blocks: 831612
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: