Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(354)

Unified Diff: chrome/browser/ui/views/frame/browser_frame.cc

Issue 6975037: Revert 85666 - Consolidate ShouldUseNativeFrame/AlwaysUseNativeFrame/UseNativeFrame spaghetti. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/frame/browser_frame.h ('k') | chrome/browser/ui/views/frame/browser_frame_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_frame.cc
===================================================================
--- chrome/browser/ui/views/frame/browser_frame.cc (revision 85701)
+++ chrome/browser/ui/views/frame/browser_frame.cc (working copy)
@@ -69,6 +69,22 @@
browser_frame_view_->UpdateThrobber(running);
}
+bool BrowserFrame::AlwaysUseNativeFrame() const {
+ // App panel windows draw their own frame.
+ if (browser_view_->IsBrowserTypePanel())
+ 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.
+ if (!browser_view_->IsBrowserTypeNormal() && ShouldUseNativeFrame())
+ return true;
+
+ // Otherwise, we use the native frame when we're told we should by the theme
+ // provider (e.g. no custom theme is active).
+ return GetThemeProvider()->ShouldUseNativeFrame();
+}
+
views::View* BrowserFrame::GetFrameView() const {
return browser_frame_view_;
}
@@ -104,7 +120,7 @@
views::NonClientFrameView* BrowserFrame::CreateFrameViewForWindow() {
#if defined(OS_WIN)
- if (ShouldUseNativeFrame()) {
+ if (AlwaysUseNativeFrame()) {
browser_frame_view_ = new GlassBrowserFrameView(this, browser_view_);
} else {
#endif
« no previous file with comments | « chrome/browser/ui/views/frame/browser_frame.h ('k') | chrome/browser/ui/views/frame/browser_frame_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698