| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_GTK_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_GTK_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_GTK_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "chrome/browser/ui/views/frame/browser_frame.h" | 10 #include "chrome/browser/ui/views/frame/browser_frame.h" |
| 11 #include "chrome/browser/ui/views/frame/native_browser_frame.h" | 11 #include "chrome/browser/ui/views/frame/native_browser_frame.h" |
| 12 #include "views/window/window_gtk.h" | 12 #include "views/window/window_gtk.h" |
| 13 | 13 |
| 14 class BrowserNonClientFrameView; | 14 class BrowserNonClientFrameView; |
| 15 class BrowserRootView; | 15 class BrowserRootView; |
| 16 | 16 |
| 17 class BrowserFrameGtk : public BrowserFrame, | 17 class BrowserFrameGtk : public views::WindowGtk, |
| 18 public views::WindowGtk, | |
| 19 public NativeBrowserFrame { | 18 public NativeBrowserFrame { |
| 20 public: | 19 public: |
| 21 // Normally you will create this class by calling BrowserFrame::Create. | 20 // Normally you will create this class by calling BrowserFrame::Create. |
| 22 // Init must be called before using this class, which Create will do for you. | 21 // Init must be called before using this class, which Create will do for you. |
| 23 BrowserFrameGtk(BrowserView* browser_view, Profile* profile); | 22 BrowserFrameGtk(BrowserFrame* browser_frame, BrowserView* browser_view); |
| 24 virtual ~BrowserFrameGtk(); | 23 virtual ~BrowserFrameGtk(); |
| 25 | 24 |
| 26 // Creates a frame view and initializes the window. This | |
| 27 // initialization function must be called after construction, it is | |
| 28 // separate to avoid recursive calling of the frame from its | |
| 29 // constructor. | |
| 30 virtual void InitBrowserFrame(); | |
| 31 | |
| 32 protected: | 25 protected: |
| 33 // Overridden from NativeBrowserFrame: | 26 // Overridden from NativeBrowserFrame: |
| 34 virtual views::NativeWindow* AsNativeWindow() OVERRIDE; | 27 virtual views::NativeWindow* AsNativeWindow() OVERRIDE; |
| 35 virtual const views::NativeWindow* AsNativeWindow() const OVERRIDE; | 28 virtual const views::NativeWindow* AsNativeWindow() const OVERRIDE; |
| 36 virtual BrowserNonClientFrameView* CreateBrowserNonClientFrameView() OVERRIDE; | |
| 37 virtual int GetMinimizeButtonOffset() const OVERRIDE; | 29 virtual int GetMinimizeButtonOffset() const OVERRIDE; |
| 38 virtual ui::ThemeProvider* GetThemeProviderForFrame() const OVERRIDE; | |
| 39 virtual bool AlwaysUseNativeFrame() const OVERRIDE; | |
| 40 virtual void TabStripDisplayModeChanged() OVERRIDE; | 30 virtual void TabStripDisplayModeChanged() OVERRIDE; |
| 41 | 31 |
| 42 // Overridden from views::WindowGtk: | 32 // Overridden from views::WindowGtk: |
| 43 virtual ui::ThemeProvider* GetThemeProvider() const OVERRIDE; | |
| 44 virtual void SetInitialFocus() OVERRIDE; | |
| 45 virtual views::RootView* CreateRootView(); | |
| 46 virtual bool GetAccelerator(int cmd_id, ui::Accelerator* accelerator); | |
| 47 virtual views::NonClientFrameView* CreateFrameViewForWindow() OVERRIDE; | |
| 48 virtual gboolean OnWindowStateEvent(GtkWidget* widget, | 33 virtual gboolean OnWindowStateEvent(GtkWidget* widget, |
| 49 GdkEventWindowState* event); | 34 GdkEventWindowState* event); |
| 50 virtual gboolean OnConfigureEvent(GtkWidget* widget, | 35 virtual gboolean OnConfigureEvent(GtkWidget* widget, |
| 51 GdkEventConfigure* event); | 36 GdkEventConfigure* event); |
| 52 | 37 |
| 53 BrowserView* browser_view() const { | |
| 54 return browser_view_; | |
| 55 } | |
| 56 | |
| 57 private: | 38 private: |
| 58 NativeBrowserFrameDelegate* delegate_; | 39 NativeBrowserFrameDelegate* delegate_; |
| 59 | 40 |
| 60 // The BrowserView is our ClientView. This is a pointer to it. | 41 // The BrowserView is our ClientView. This is a pointer to it. |
| 61 BrowserView* browser_view_; | 42 BrowserView* browser_view_; |
| 62 | 43 |
| 63 DISALLOW_COPY_AND_ASSIGN(BrowserFrameGtk); | 44 DISALLOW_COPY_AND_ASSIGN(BrowserFrameGtk); |
| 64 }; | 45 }; |
| 65 | 46 |
| 66 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_GTK_H_ | 47 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_GTK_H_ |
| OLD | NEW |