diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-28 22:51:59 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-28 22:51:59 +0000 |
commit | 31dc3fbaf15769f904ecc00b0ab7aefe37acdeec (patch) | |
tree | 4e30730cff542ad8fc9b7c056b7afc105b53ebe8 /chrome/browser/views | |
parent | a56e241c13e0994bdd4406511ea3da4a0aade449 (diff) | |
download | chromium_src-31dc3fbaf15769f904ecc00b0ab7aefe37acdeec.zip chromium_src-31dc3fbaf15769f904ecc00b0ab7aefe37acdeec.tar.gz chromium_src-31dc3fbaf15769f904ecc00b0ab7aefe37acdeec.tar.bz2 |
Always use opaque frame for extension app windows. It hasn't been implemented for the glass frame yet.
Review URL: http://codereview.chromium.org/1727009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45874 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
4 files changed, 9 insertions, 1 deletions
diff --git a/chrome/browser/views/frame/browser_frame_win.cc b/chrome/browser/views/frame/browser_frame_win.cc index 0092fa7..7239b53 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. diff --git a/chrome/browser/views/frame/opaque_browser_frame_view.cc b/chrome/browser/views/frame/opaque_browser_frame_view.cc index af74018..5014ef42 100644 --- a/chrome/browser/views/frame/opaque_browser_frame_view.cc +++ b/chrome/browser/views/frame/opaque_browser_frame_view.cc @@ -261,6 +261,10 @@ bool OpaqueBrowserFrameView::AlwaysUseNativeFrame() const { return frame_->AlwaysUseNativeFrame(); } +bool OpaqueBrowserFrameView::AlwaysUseCustomFrame() const { + return true; +} + gfx::Rect OpaqueBrowserFrameView::GetWindowBoundsForClientBounds( const gfx::Rect& client_bounds) const { int top_height = NonClientTopBorderHeight(); diff --git a/chrome/browser/views/frame/opaque_browser_frame_view.h b/chrome/browser/views/frame/opaque_browser_frame_view.h index 53fbc21..cc93fad 100644 --- a/chrome/browser/views/frame/opaque_browser_frame_view.h +++ b/chrome/browser/views/frame/opaque_browser_frame_view.h @@ -40,6 +40,7 @@ class OpaqueBrowserFrameView : public BrowserNonClientFrameView, // Overridden from views::NonClientFrameView: virtual gfx::Rect GetBoundsForClientView() const; virtual bool AlwaysUseNativeFrame() const; + virtual bool AlwaysUseCustomFrame() const; virtual gfx::Rect GetWindowBoundsForClientBounds( const gfx::Rect& client_bounds) const; virtual int NonClientHitTest(const gfx::Point& point); diff --git a/chrome/browser/views/tabs/tab_strip.cc b/chrome/browser/views/tabs/tab_strip.cc index 6ab646c..7f31722 100644 --- a/chrome/browser/views/tabs/tab_strip.cc +++ b/chrome/browser/views/tabs/tab_strip.cc @@ -478,7 +478,7 @@ void TabStrip::PaintChildren(gfx::Canvas* canvas) { } } - if (GetThemeProvider()->ShouldUseNativeFrame()) { + if (GetWindow()->GetNonClientView()->UseNativeFrame()) { // Make sure unselected tabs are somewhat transparent. SkPaint paint; paint.setColor(SkColorSetARGB(200, 255, 255, 255)); |