diff options
author | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-22 21:51:21 +0000 |
---|---|---|
committer | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-22 21:51:21 +0000 |
commit | caadfcaf9a3a2d1170519e891aadf8ef143274b4 (patch) | |
tree | e40efe4908cf40fe0995d619ab520de7a33d47da /chrome/browser/app_controller_mac.h | |
parent | 23cdb20c37deb0fcdef3a0611951008a3988a32c (diff) | |
download | chromium_src-caadfcaf9a3a2d1170519e891aadf8ef143274b4.zip chromium_src-caadfcaf9a3a2d1170519e891aadf8ef143274b4.tar.gz chromium_src-caadfcaf9a3a2d1170519e891aadf8ef143274b4.tar.bz2 |
Mac: improve situation with respect to launching/DnD local files.
This is half the solution, but it should make some stuff work. This should make
double-clicking on local HTML files (when Chromium is set as default browser)
work more correctly, both when Chromium is already running and when it's not.
(The same, but easier to check: dragging a file or files to the Chromium
application icon.) You should no longer be told that Chromium can't open HTML
files. It's not the full solution since an extraneous (NTP/home page) tab -- or
worse -- will be created if Chromium is not already running; solving this will
require modifying browser startup.
BUG=14808
TEST=Drag a file to the Chromium application icon, both when it's already running and when it's not; file should open in a tab. Do the same, but select multiple files; selected files should open in tabs. Check the same for the Chromium Dock icon (when Chromium is already running). Note that if Chromium is not running, there will be an extraneous (NTP or home page) tab.
Review URL: http://codereview.chromium.org/552109
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36902 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/app_controller_mac.h')
-rw-r--r-- | chrome/browser/app_controller_mac.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/chrome/browser/app_controller_mac.h b/chrome/browser/app_controller_mac.h index ba04a49..19cfcf6 100644 --- a/chrome/browser/app_controller_mac.h +++ b/chrome/browser/app_controller_mac.h @@ -33,10 +33,11 @@ class Profile; PreferencesWindowController* prefsController_; // Weak. AboutWindowController* aboutController_; // Weak. - // URLs that need to be opened when the app is fully initialized. Because it's - // only needed during early startup, it points to a valid vector during early - // startup and is NULL during the rest of app execution. - scoped_ptr<std::vector<GURL> > pendingURLs_; + // If we're told to open URLs (in particular, via |-application:openFiles:| by + // Launch Services) before we've launched the browser, we queue them up in + // |startupURLs_| so that they can go in the first browser window/tab. + std::vector<GURL> startupURLs_; + BOOL startupComplete_; // Outlets for the close tab/window menu items so that we can adjust the // commmand-key equivalent depending on the kind of window and how many @@ -50,6 +51,8 @@ class Profile; IBOutlet NSMenu* helpMenu_; } +@property(readonly, nonatomic) BOOL startupComplete; + - (void)didEndMainMessageLoop; - (Profile*)defaultProfile; @@ -64,6 +67,12 @@ class Profile; // Delegate method to return the dock menu. - (NSMenu*)applicationDockMenu:(NSApplication*)sender; +// Get the URLs that Launch Services expects the browser to open at startup. +- (const std::vector<GURL>&)startupURLs; + +// Clear the list of startup URLs. +- (void)clearStartupURLs; + @end #endif |