diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-20 20:27:44 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-20 20:27:44 +0000 |
commit | af801acd0220b2d7aa69e0f750d06aed86e0c4f9 (patch) | |
tree | 73b94d1957aae85ee350fa7c6e255bd6c4656790 /chrome | |
parent | 9d8fe3b2085717e5889809255393f50d71a69365 (diff) | |
download | chromium_src-af801acd0220b2d7aa69e0f750d06aed86e0c4f9.zip chromium_src-af801acd0220b2d7aa69e0f750d06aed86e0c4f9.tar.gz chromium_src-af801acd0220b2d7aa69e0f750d06aed86e0c4f9.tar.bz2 |
Revert r56902
TBR=rafaelw@chromium.org
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56907 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/browser.cc | 18 | ||||
-rw-r--r-- | chrome/browser/browser.h | 7 | ||||
-rw-r--r-- | chrome/browser/chromeos/wm_overview_controller.cc | 3 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_tabs_module.cc | 2 | ||||
-rw-r--r-- | chrome/browser/views/frame/browser_frame_win.cc | 3 |
5 files changed, 25 insertions, 8 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index f3bc946..63f0338 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -172,7 +172,8 @@ bool BrowserHostsExtensionApp(Browser* browser, if (browser->profile() != profile) return false; - if (browser->type() != Browser::TYPE_APP_PANEL) + if (browser->type() != Browser::TYPE_EXTENSION_APP && + browser->type() != Browser::TYPE_APP_PANEL) return false; if (browser->extension_app() != extension_app) @@ -326,6 +327,8 @@ Browser* Browser::CreateForApp(const std::string& app_name, if (is_panel) type = TYPE_APP_PANEL; + else if (extension) + type = TYPE_EXTENSION_APP; Browser* browser = new Browser(type, profile); browser->app_name_ = app_name; @@ -1174,16 +1177,16 @@ bool Browser::SupportsWindowFeatureImpl(WindowFeature feature, } if (!hide_ui_for_fullscreen) { - if (type() != TYPE_NORMAL) + if (type() != TYPE_NORMAL && type() != TYPE_EXTENSION_APP) features |= FEATURE_TITLEBAR; - if (type() == TYPE_NORMAL) + if (type() == TYPE_NORMAL || type() == TYPE_EXTENSION_APP) features |= FEATURE_TABSTRIP; - if (type() == TYPE_NORMAL) + if (type() == TYPE_NORMAL || type() == TYPE_EXTENSION_APP) features |= FEATURE_TOOLBAR; - if ((type() & Browser::TYPE_APP) == 0) + if (type() != TYPE_EXTENSION_APP && (type() & Browser::TYPE_APP) == 0) features |= FEATURE_LOCATIONBAR; } return !!(features & feature); @@ -2451,7 +2454,10 @@ void Browser::ToggleUseVerticalTabs() { } bool Browser::LargeIconsPermitted() const { - return false; + // We don't show the big icons in tabs for TYPE_EXTENSION_APP windows because + // for those windows, we already have a big icon in the top-left outside any + // tab. Having big tab icons too looks kinda redonk. + return TYPE_EXTENSION_APP != type(); } /////////////////////////////////////////////////////////////////////////////// diff --git a/chrome/browser/browser.h b/chrome/browser/browser.h index 6aa311c..4c99238 100644 --- a/chrome/browser/browser.h +++ b/chrome/browser/browser.h @@ -61,12 +61,19 @@ class Browser : public TabStripModelDelegate, TYPE_POPUP = 2, // The old-style app created via "Create application shortcuts". TYPE_APP = 4, + // The new-style app created by installing a crx. This kinda needs to be + // separate because we require larger icons and an application name that + // are found in the crx. If we ever decide to create this kind of app using + // some other system (eg some web standard), maybe we should generalize this + // name to TYPE_MULTITAB or something. + TYPE_EXTENSION_APP = 8, TYPE_APP_POPUP = TYPE_APP | TYPE_POPUP, TYPE_DEVTOOLS = TYPE_APP | 16, TYPE_APP_PANEL = TYPE_APP | 32, TYPE_ANY = TYPE_NORMAL | TYPE_POPUP | TYPE_APP | + TYPE_EXTENSION_APP | TYPE_DEVTOOLS | TYPE_APP_PANEL }; diff --git a/chrome/browser/chromeos/wm_overview_controller.cc b/chrome/browser/chromeos/wm_overview_controller.cc index 5200dee..5e40520 100644 --- a/chrome/browser/chromeos/wm_overview_controller.cc +++ b/chrome/browser/chromeos/wm_overview_controller.cc @@ -644,7 +644,8 @@ void WmOverviewController::AddAllBrowsers() { // Don't add a browser to the list if that type of browser doesn't // have snapshots in overview mode. if ((*iterator)->type() != Browser::TYPE_NORMAL && - (*iterator)->type() != Browser::TYPE_APP) { + (*iterator)->type() != Browser::TYPE_APP && + (*iterator)->type() != Browser::TYPE_EXTENSION_APP) { ++iterator; continue; } diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc index 107561a..b74d714 100644 --- a/chrome/browser/extensions/extension_tabs_module.cc +++ b/chrome/browser/extensions/extension_tabs_module.cc @@ -1090,7 +1090,7 @@ static bool GetTabById(int tab_id, Profile* profile, static std::string GetWindowTypeText(Browser::Type type) { // Note: for app popups, we report "app". - if ((type & Browser::TYPE_APP) != 0) + if ((type & Browser::TYPE_APP) != 0 || type == Browser::TYPE_EXTENSION_APP) return keys::kWindowTypeValueApp; if ((type & Browser::TYPE_POPUP) != 0) return keys::kWindowTypeValuePopup; diff --git a/chrome/browser/views/frame/browser_frame_win.cc b/chrome/browser/views/frame/browser_frame_win.cc index 0ce28b9..22fb3cc 100644 --- a/chrome/browser/views/frame/browser_frame_win.cc +++ b/chrome/browser/views/frame/browser_frame_win.cc @@ -111,6 +111,9 @@ bool BrowserFrameWin::AlwaysUseNativeFrame() const { if (browser_view_->IsBrowserTypePanel()) return false; + if (browser_view_->browser()->type() == Browser::TYPE_EXTENSION_APP) + return false; + // We don't theme popup or app windows, so regardless of whether or not a // theme is active for normal browser windows, we don't want to use the custom // frame for popups/apps. |