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

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

Issue 146363002: Linux Aura: Use system title bar is now set by preference, not flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert adding argument to FrameTypeChanged everywhere (thanks sky). Created 6 years, 10 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
Index: chrome/browser/ui/views/frame/browser_frame.h
diff --git a/chrome/browser/ui/views/frame/browser_frame.h b/chrome/browser/ui/views/frame/browser_frame.h
index 8346db4537984747a44ec37d25c3d934798009f6..2e4db187f4679336478bee01654ce82a56f13183 100644
--- a/chrome/browser/ui/views/frame/browser_frame.h
+++ b/chrome/browser/ui/views/frame/browser_frame.h
@@ -7,6 +7,7 @@
#include "base/compiler_specific.h"
#include "base/logging.h"
+#include "base/prefs/pref_member.h"
#include "build/build_config.h"
#include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h"
#include "ui/views/context_menu_controller.h"
@@ -74,6 +75,9 @@ class BrowserFrame
// Returns the NonClientFrameView of this frame.
views::View* GetFrameView() const;
+ // Returns |true| if we should use the custom frame.
+ bool UseCustomFrame() const;
+
// Overridden from views::Widget:
virtual views::internal::RootView* CreateRootView() OVERRIDE;
virtual views::NonClientFrameView* CreateNonClientFrameView() OVERRIDE;
@@ -102,6 +106,9 @@ class BrowserFrame
ui::MenuModel* GetSystemMenuModel();
private:
+ // Called when the preference changes.
+ void OnUseCustomChromeFrameChanged();
+
NativeBrowserFrame* native_browser_frame_;
// A weak reference to the root view associated with the window. We save a
@@ -128,6 +135,11 @@ class BrowserFrame
scoped_ptr<ui::ThemeProvider> owned_theme_provider_;
ui::ThemeProvider* theme_provider_;
+ // Whether the custom chrome frame pref is set. Normally you want to use
msw 2014/02/06 00:50:27 nit: capitalize "Chrome"; remove "Normally you wan
Matt Giuca 2014/02/11 04:57:43 Done. Just removed the second sentence -- there is
+ // UseCustomFrame() above to determine whether to use the custom frame or
+ // not.
+ BooleanPrefMember use_custom_frame_pref_;
+
DISALLOW_COPY_AND_ASSIGN(BrowserFrame);
};

Powered by Google App Engine
This is Rietveld 408576698