diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-19 08:58:12 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-19 08:58:12 +0000 |
commit | 7d8867df6c96bf76c040042a834af04a8ab319bc (patch) | |
tree | 3e0914651dc6093502fc65fb89631bd34031528e /chrome/browser/browser.cc | |
parent | 6145198177d58f79e7ed1b44fee883ea074fc5fa (diff) | |
download | chromium_src-7d8867df6c96bf76c040042a834af04a8ab319bc.zip chromium_src-7d8867df6c96bf76c040042a834af04a8ab319bc.tar.gz chromium_src-7d8867df6c96bf76c040042a834af04a8ab319bc.tar.bz2 |
Refactor app-related manifest properties so that they don't
include the name 'app'. I think these will be useful for normal
extensions, too.
Also extract an ExtensionExtent class out of Extension. I think
this will be useful for passing by value to the IO thread.
Review URL: http://codereview.chromium.org/1025006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42091 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser.cc')
-rw-r--r-- | chrome/browser/browser.cc | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index 5e662e0..f2779af 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -381,9 +381,9 @@ bool Browser::OpenApplication(Profile* profile, const std::string& app_id) { return false; // TODO(erikkay): Support refocus. - Extension::AppLaunchType launch_type = - extension_app->app_launch_type(); - switch (launch_type) { + Extension::LaunchContainer launch_container = + extension_app->launch_container(); + switch (launch_container) { case Extension::LAUNCH_WINDOW: case Extension::LAUNCH_PANEL: Browser::OpenApplicationWindow(profile, extension_app); @@ -421,8 +421,9 @@ void Browser::OpenApplicationWindow(Profile* profile, const GURL& url, // Set UPDATE_SHORTCUT as the pending web app action. This action is picked // up in LoadingStateChanged to schedule a GetApplicationInfo. And when // the web app info is available, TabContents notifies Browser via - // OnDidGetApplicationInfo, which calls web_app::UpdateShortcutForTabContents - // when it sees UPDATE_SHORTCUT as pending web app action. + // OnDidGetApplicationInfo, which calls + // web_app::UpdateShortcutForTabContents when it sees UPDATE_SHORTCUT as + // pending web app action. browser->pending_web_app_action_ = UPDATE_SHORTCUT; } } @@ -430,13 +431,13 @@ void Browser::OpenApplicationWindow(Profile* profile, const GURL& url, // static void Browser::OpenApplicationWindow(Profile* profile, Extension* extension) { OpenApplicationWindow(profile, - extension->app_launch_url(), - (extension->app_launch_type() == Extension::LAUNCH_PANEL)); + extension->GetFullLaunchURL(), + (extension->launch_container() == Extension::LAUNCH_PANEL)); } // static bool Browser::OpenApplicationTab(Profile* profile, Extension* extension) { - DCHECK_EQ(extension->app_launch_type(), Extension::LAUNCH_TAB); + DCHECK_EQ(extension->launch_container(), Extension::LAUNCH_TAB); Browser* browser = BrowserList::GetLastActiveWithProfile(profile); if (!browser || browser->type() != Browser::TYPE_NORMAL) @@ -444,7 +445,7 @@ bool Browser::OpenApplicationTab(Profile* profile, Extension* extension) { // TODO(erikkay): This doesn't seem like the right transition in all cases. PageTransition::Type transition = PageTransition::START_PAGE; - GURL url = extension->app_launch_url(); + GURL url = extension->GetFullLaunchURL(); TabContents* tab_contents = browser->CreateTabContentsForURL(url, GURL(), profile, transition, false, NULL); |