Comment #33 on issue 14808 by [email protected]: Double-clicking a
local html file with Chrome as default browser doesn't open the file
http://code.google.com/p/chromium/issues/detail?id=14808
For those following along, I am actually getting back to this. Here's an
update on/summary of the
situation.
Details: The issue is that fixing this problem requires a re-work of the
way the browser starts up.
Currently, the start-up sequence is built with the assumption that URLs to
be opened on start-up
are passed on the command-line and are thus available to the application
immediately. This is not
how things typically work on the Mac.
What happens on a Mac when, e.g., you double-click on a file (or drag a
file to the application
icon), is that the application is started by Launch Services and only later
is the file to be opened
passed along to the application. This occurs via an Apple Event (which gets
translated by Cocoa to
a method call), and receiving this event can only happen after the main
(UI) message loop has
started, which is much later in the start-up sequence. By this time, in the
current design
Chromium/Chrome has already begun to open browser windows, so it is too
late to properly deal
with the notification from Launch Services.
Changing the start-up sequence is nontrivial, but can be done (indeed, I've
done it in the patch
referred to above). The difficulty is doing so in a way which does not slow
our start-up times. Note
that the common case is to start Chromium/Chrome with no local file (e.g.,
by clicking on a Dock
icon), so it's worth caring about how long it takes.
Further considerations:
- Currently we run the first-run dialog from outside the main UI message
loop, which is both kind
of scary and indeed leads to (at least) one bug (the menu doesn't work
properly). We really should
move it inside a message loop.
- We'll need to figure out how app mode ("Application Shortcuts") will
start in a number of
different cases: (1) with Chromium/Chrome not running; (2) with it already
running; and also (3)
with it running but on a different profile.
Probably the best thing to do from an engineering perspective is to spin
the message loop for a bit
earlier in our start-up (which itself is a little scary). This would
integrate better with the cross-
platform code and would let us run the first-run dialog properly. However,
this has even more
potential for affecting start-up times negatively.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs