diff options
author | andybons@chromium.org <andybons@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-19 15:22:20 +0000 |
---|---|---|
committer | andybons@chromium.org <andybons@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-19 15:22:20 +0000 |
commit | 9bf14a24e1de759fddfbbee8050d65ef2d95ef18 (patch) | |
tree | 24aa03d05b22be52366d8baf06dab96638ecf71b /chrome/browser/browser.cc | |
parent | e685fc4178818c026f1498461edb3f2bfeff5722 (diff) | |
download | chromium_src-9bf14a24e1de759fddfbbee8050d65ef2d95ef18.zip chromium_src-9bf14a24e1de759fddfbbee8050d65ef2d95ef18.tar.gz chromium_src-9bf14a24e1de759fddfbbee8050d65ef2d95ef18.tar.bz2 |
Revert 42091 - Refactor apprelated 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
TBR=aa@chromium.org
Review URL: http://codereview.chromium.org/1120005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42104 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser.cc')
-rw-r--r-- | chrome/browser/browser.cc | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index 378d86e..61de33c 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::LaunchContainer launch_container = - extension_app->launch_container(); - switch (launch_container) { + Extension::AppLaunchType launch_type = + extension_app->app_launch_type(); + switch (launch_type) { case Extension::LAUNCH_WINDOW: case Extension::LAUNCH_PANEL: Browser::OpenApplicationWindow(profile, extension_app); @@ -421,9 +421,8 @@ 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; } } @@ -431,13 +430,13 @@ void Browser::OpenApplicationWindow(Profile* profile, const GURL& url, // static void Browser::OpenApplicationWindow(Profile* profile, Extension* extension) { OpenApplicationWindow(profile, - extension->GetFullLaunchURL(), - (extension->launch_container() == Extension::LAUNCH_PANEL)); + extension->app_launch_url(), + (extension->app_launch_type() == Extension::LAUNCH_PANEL)); } // static bool Browser::OpenApplicationTab(Profile* profile, Extension* extension) { - DCHECK_EQ(extension->launch_container(), Extension::LAUNCH_TAB); + DCHECK_EQ(extension->app_launch_type(), Extension::LAUNCH_TAB); Browser* browser = BrowserList::GetLastActiveWithProfile(profile); if (!browser || browser->type() != Browser::TYPE_NORMAL) @@ -445,7 +444,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->GetFullLaunchURL(); + GURL url = extension->app_launch_url(); TabContents* tab_contents = browser->CreateTabContentsForURL(url, GURL(), profile, transition, false, NULL); |