Chromium Code Reviews| 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" |
| 11 #include "build/build_config.h" | 11 #include "build/build_config.h" |
| 12 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" | 12 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" |
| 13 #include "ui/views/context_menu_controller.h" | 13 #include "ui/views/context_menu_controller.h" |
| 14 #include "ui/views/controls/button/menu_button.h" | |
|
Peter Kasting
2017/04/26 02:09:53
Nit: Forward-declare rather than #include
emx
2017/04/27 16:30:58
Done.
| |
| 14 #include "ui/views/widget/widget.h" | 15 #include "ui/views/widget/widget.h" |
| 15 | 16 |
| 16 class BrowserRootView; | 17 class BrowserRootView; |
| 17 class BrowserView; | 18 class BrowserView; |
| 18 class NativeBrowserFrame; | 19 class NativeBrowserFrame; |
| 19 class NonClientFrameView; | 20 class NonClientFrameView; |
| 20 class SystemMenuModelBuilder; | 21 class SystemMenuModelBuilder; |
| 21 | 22 |
| 22 namespace content { | 23 namespace content { |
| 23 struct NativeWebKeyboardEvent; | 24 struct NativeWebKeyboardEvent; |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 111 void SchedulePaintInRect(const gfx::Rect& rect) override; | 112 void SchedulePaintInRect(const gfx::Rect& rect) override; |
| 112 void OnNativeWidgetActivationChanged(bool active) override; | 113 void OnNativeWidgetActivationChanged(bool active) override; |
| 113 void OnNativeWidgetWorkspaceChanged() override; | 114 void OnNativeWidgetWorkspaceChanged() override; |
| 114 void OnNativeThemeUpdated(ui::NativeTheme* observed_theme) override; | 115 void OnNativeThemeUpdated(ui::NativeTheme* observed_theme) override; |
| 115 | 116 |
| 116 // Overridden from views::ContextMenuController: | 117 // Overridden from views::ContextMenuController: |
| 117 void ShowContextMenuForView(views::View* source, | 118 void ShowContextMenuForView(views::View* source, |
| 118 const gfx::Point& p, | 119 const gfx::Point& p, |
| 119 ui::MenuSourceType source_type) override; | 120 ui::MenuSourceType source_type) override; |
| 120 | 121 |
| 121 views::View* GetNewAvatarMenuButton(); | 122 views::MenuButton* GetNewAvatarMenuButton(); |
| 122 | 123 |
| 123 // Returns the menu model. BrowserFrame owns the returned model. | 124 // Returns the menu model. BrowserFrame owns the returned model. |
| 124 // Note that in multi user mode this will upon each call create a new model. | 125 // Note that in multi user mode this will upon each call create a new model. |
| 125 ui::MenuModel* GetSystemMenuModel(); | 126 ui::MenuModel* GetSystemMenuModel(); |
| 126 | 127 |
| 127 private: | 128 private: |
| 128 // Callback for MenuModelAdapter. | 129 // Callback for MenuModelAdapter. |
| 129 void OnMenuClosed(); | 130 void OnMenuClosed(); |
| 130 | 131 |
| 131 NativeBrowserFrame* native_browser_frame_; | 132 NativeBrowserFrame* native_browser_frame_; |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 146 // Used to show the system menu. Only used if | 147 // Used to show the system menu. Only used if |
| 147 // NativeBrowserFrame::UsesNativeSystemMenu() returns false. | 148 // NativeBrowserFrame::UsesNativeSystemMenu() returns false. |
| 148 std::unique_ptr<views::MenuRunner> menu_runner_; | 149 std::unique_ptr<views::MenuRunner> menu_runner_; |
| 149 | 150 |
| 150 std::unique_ptr<ui::EventHandler> browser_command_handler_; | 151 std::unique_ptr<ui::EventHandler> browser_command_handler_; |
| 151 | 152 |
| 152 DISALLOW_COPY_AND_ASSIGN(BrowserFrame); | 153 DISALLOW_COPY_AND_ASSIGN(BrowserFrame); |
| 153 }; | 154 }; |
| 154 | 155 |
| 155 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_H_ | 156 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_H_ |
| OLD | NEW |