Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / views / frame / browser_frame.h
index 5c130af..fa379b2 100644 (file)
@@ -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"
@@ -21,7 +22,7 @@ class NonClientFrameView;
 class SystemMenuModelBuilder;
 
 namespace gfx {
-class Font;
+class FontList;
 class Rect;
 }
 
@@ -43,7 +44,7 @@ class BrowserFrame
   explicit BrowserFrame(BrowserView* browser_view);
   virtual ~BrowserFrame();
 
-  static const gfx::Font& GetTitleFont();
+  static const gfx::FontList& GetTitleFontList();
 
   // Initialize the frame (creates the underlying native window).
   void InitBrowserFrame();
@@ -59,11 +60,11 @@ class BrowserFrame
   // TabStrip view.
   gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const;
 
-  // Returns the y coordinate within the window at which the horizontal TabStrip
-  // begins (or would begin).  If |force_restored| is true, this is calculated
-  // as if we were in restored mode regardless of the current mode.
-  BrowserNonClientFrameView::TabStripInsets GetTabStripInsets(
-      bool force_restored) const;
+  // Returns the inset of the topmost view in the client view from the top of
+  // the non-client view. The topmost view depends on the window type. The
+  // topmost view is the tab strip for tabbed browser windows, the toolbar for
+  // popups, the web contents for app windows and varies for fullscreen windows
+  int GetTopInset() const;
 
   // Returns the amount that the theme background should be inset.
   int GetThemeBackgroundXInset() const;
@@ -74,9 +75,8 @@ class BrowserFrame
   // Returns the NonClientFrameView of this frame.
   views::View* GetFrameView() const;
 
-  // Notifies the frame that the tab strip display mode changed so it can update
-  // its frame treatment if necessary.
-  void TabStripDisplayModeChanged();
+  // Returns |true| if we should use the custom frame.
+  bool UseCustomFrame() const;
 
   // Overridden from views::Widget:
   virtual views::internal::RootView* CreateRootView() OVERRIDE;
@@ -106,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
@@ -132,6 +135,9 @@ class BrowserFrame
   scoped_ptr<ui::ThemeProvider> owned_theme_provider_;
   ui::ThemeProvider* theme_provider_;
 
+  // Whether the custom Chrome frame preference is set.
+  BooleanPrefMember use_custom_frame_pref_;
+
   DISALLOW_COPY_AND_ASSIGN(BrowserFrame);
 };