OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_DESKTOP_BROWSER_FRAME_AURA_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_DESKTOP_BROWSER_FRAME_AURA_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_DESKTOP_BROWSER_FRAME_AURA_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_DESKTOP_BROWSER_FRAME_AURA_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "chrome/browser/ui/views/frame/native_browser_frame.h" | 10 #include "chrome/browser/ui/views/frame/native_browser_frame.h" |
11 #include "ui/views/context_menu_controller.h" | 11 #include "ui/views/context_menu_controller.h" |
12 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" | 12 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" |
13 | 13 |
14 class BrowserDesktopRootWindowHost; | 14 class BrowserDesktopRootWindowHost; |
15 class BrowserFrame; | 15 class BrowserFrame; |
16 class BrowserView; | 16 class BrowserView; |
17 | 17 |
18 namespace views { | 18 namespace views { |
19 class MenuRunner; | |
20 namespace corewm { | 19 namespace corewm { |
21 class VisibilityController; | 20 class VisibilityController; |
22 } | 21 } |
23 } | 22 } |
24 | 23 |
25 //////////////////////////////////////////////////////////////////////////////// | 24 //////////////////////////////////////////////////////////////////////////////// |
26 // DesktopBrowserFrameAura | 25 // DesktopBrowserFrameAura |
27 // | 26 // |
28 // DesktopBrowserFrameAura is a DesktopNativeWidgetAura subclass that provides | 27 // DesktopBrowserFrameAura is a DesktopNativeWidgetAura subclass that provides |
29 // the window frame for the Chrome browser window. | 28 // the window frame for the Chrome browser window. |
30 // | 29 // |
31 class DesktopBrowserFrameAura : public views::DesktopNativeWidgetAura, | 30 class DesktopBrowserFrameAura : public views::DesktopNativeWidgetAura, |
32 public NativeBrowserFrame { | 31 public NativeBrowserFrame { |
33 public: | 32 public: |
34 DesktopBrowserFrameAura(BrowserFrame* browser_frame, | 33 DesktopBrowserFrameAura(BrowserFrame* browser_frame, |
35 BrowserView* browser_view); | 34 BrowserView* browser_view); |
36 | 35 |
37 BrowserView* browser_view() const { return browser_view_; } | 36 BrowserView* browser_view() const { return browser_view_; } |
38 | 37 |
39 protected: | 38 protected: |
40 // Overridden from views::DesktopNativeWidgetAura: | 39 // Overridden from views::DesktopNativeWidgetAura: |
41 virtual void InitNativeWidget( | 40 virtual void InitNativeWidget( |
42 const views::Widget::InitParams& params) OVERRIDE; | 41 const views::Widget::InitParams& params) OVERRIDE; |
43 virtual void OnWindowDestroying() OVERRIDE; | 42 virtual void OnWindowDestroying() OVERRIDE; |
44 | 43 |
45 // Overridden from NativeBrowserFrame: | 44 // Overridden from NativeBrowserFrame: |
46 virtual views::NativeWidget* AsNativeWidget() OVERRIDE; | 45 virtual views::NativeWidget* AsNativeWidget() OVERRIDE; |
47 virtual const views::NativeWidget* AsNativeWidget() const OVERRIDE; | 46 virtual const views::NativeWidget* AsNativeWidget() const OVERRIDE; |
48 virtual void InitSystemContextMenu() OVERRIDE; | 47 virtual bool UsesNativeSystemMenu() const OVERRIDE; |
49 virtual int GetMinimizeButtonOffset() const OVERRIDE; | 48 virtual int GetMinimizeButtonOffset() const OVERRIDE; |
50 virtual void TabStripDisplayModeChanged() OVERRIDE; | 49 virtual void TabStripDisplayModeChanged() OVERRIDE; |
51 | 50 |
52 private: | 51 private: |
53 virtual ~DesktopBrowserFrameAura(); | 52 virtual ~DesktopBrowserFrameAura(); |
54 | 53 |
55 // The BrowserView is our ClientView. This is a pointer to it. | 54 // The BrowserView is our ClientView. This is a pointer to it. |
56 BrowserView* browser_view_; | 55 BrowserView* browser_view_; |
57 BrowserFrame* browser_frame_; | 56 BrowserFrame* browser_frame_; |
58 | 57 |
59 // Owned by the RootWindow. | 58 // Owned by the RootWindow. |
60 BrowserDesktopRootWindowHost* browser_desktop_root_window_host_; | 59 BrowserDesktopRootWindowHost* browser_desktop_root_window_host_; |
61 | 60 |
62 // System menu. | |
63 scoped_ptr<views::MenuRunner> menu_runner_; | |
64 | |
65 scoped_ptr<views::corewm::VisibilityController> visibility_controller_; | 61 scoped_ptr<views::corewm::VisibilityController> visibility_controller_; |
66 | 62 |
67 DISALLOW_COPY_AND_ASSIGN(DesktopBrowserFrameAura); | 63 DISALLOW_COPY_AND_ASSIGN(DesktopBrowserFrameAura); |
68 }; | 64 }; |
69 | 65 |
70 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_DESKTOP_BROWSER_FRAME_AURA_H_ | 66 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_DESKTOP_BROWSER_FRAME_AURA_H_ |
OLD | NEW |