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_BROWSER_FRAME_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 class FontList; | 27 class FontList; |
28 class Rect; | 28 class Rect; |
29 } | 29 } |
30 | 30 |
31 namespace ui { | 31 namespace ui { |
32 class EventHandler; | 32 class EventHandler; |
33 class MenuModel; | 33 class MenuModel; |
34 } | 34 } |
35 | 35 |
36 namespace views { | 36 namespace views { |
| 37 class MenuButton; |
37 class MenuRunner; | 38 class MenuRunner; |
38 class View; | 39 class View; |
39 } | 40 } |
40 | 41 |
41 // This is a virtual interface that allows system specific browser frames. | 42 // This is a virtual interface that allows system specific browser frames. |
42 class BrowserFrame | 43 class BrowserFrame |
43 : public views::Widget, | 44 : public views::Widget, |
44 public views::ContextMenuController { | 45 public views::ContextMenuController { |
45 public: | 46 public: |
46 explicit BrowserFrame(BrowserView* browser_view); | 47 explicit BrowserFrame(BrowserView* browser_view); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 void SchedulePaintInRect(const gfx::Rect& rect) override; | 109 void SchedulePaintInRect(const gfx::Rect& rect) override; |
109 void OnNativeWidgetActivationChanged(bool active) override; | 110 void OnNativeWidgetActivationChanged(bool active) override; |
110 void OnNativeWidgetWorkspaceChanged() override; | 111 void OnNativeWidgetWorkspaceChanged() override; |
111 void OnNativeThemeUpdated(ui::NativeTheme* observed_theme) override; | 112 void OnNativeThemeUpdated(ui::NativeTheme* observed_theme) override; |
112 | 113 |
113 // Overridden from views::ContextMenuController: | 114 // Overridden from views::ContextMenuController: |
114 void ShowContextMenuForView(views::View* source, | 115 void ShowContextMenuForView(views::View* source, |
115 const gfx::Point& p, | 116 const gfx::Point& p, |
116 ui::MenuSourceType source_type) override; | 117 ui::MenuSourceType source_type) override; |
117 | 118 |
118 views::View* GetNewAvatarMenuButton(); | 119 views::MenuButton* GetNewAvatarMenuButton(); |
119 | 120 |
120 // Returns the menu model. BrowserFrame owns the returned model. | 121 // Returns the menu model. BrowserFrame owns the returned model. |
121 // Note that in multi user mode this will upon each call create a new model. | 122 // Note that in multi user mode this will upon each call create a new model. |
122 ui::MenuModel* GetSystemMenuModel(); | 123 ui::MenuModel* GetSystemMenuModel(); |
123 | 124 |
124 private: | 125 private: |
125 // Callback for MenuModelAdapter. | 126 // Callback for MenuModelAdapter. |
126 void OnMenuClosed(); | 127 void OnMenuClosed(); |
127 | 128 |
128 NativeBrowserFrame* native_browser_frame_; | 129 NativeBrowserFrame* native_browser_frame_; |
(...skipping 14 matching lines...) Expand all Loading... |
143 // Used to show the system menu. Only used if | 144 // Used to show the system menu. Only used if |
144 // NativeBrowserFrame::UsesNativeSystemMenu() returns false. | 145 // NativeBrowserFrame::UsesNativeSystemMenu() returns false. |
145 std::unique_ptr<views::MenuRunner> menu_runner_; | 146 std::unique_ptr<views::MenuRunner> menu_runner_; |
146 | 147 |
147 std::unique_ptr<ui::EventHandler> browser_command_handler_; | 148 std::unique_ptr<ui::EventHandler> browser_command_handler_; |
148 | 149 |
149 DISALLOW_COPY_AND_ASSIGN(BrowserFrame); | 150 DISALLOW_COPY_AND_ASSIGN(BrowserFrame); |
150 }; | 151 }; |
151 | 152 |
152 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_H_ | 153 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_H_ |
OLD | NEW |