Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(355)

Side by Side Diff: chrome/browser/ui/views/frame/browser_frame.h

Issue 2074643003: MacViews: Views accelerators table should match the Cocoa one. (Closed) Base URL: ssh://bitbucket.browser.yandex-team.ru/chromium/src.git@master
Patch Set: Make (Pre)HandleKeyboardEvent pure virtual. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/widget/widget.h" 14 #include "ui/views/widget/widget.h"
15 15
16 class AvatarMenuButton; 16 class AvatarMenuButton;
17 class BrowserRootView; 17 class BrowserRootView;
18 class BrowserView; 18 class BrowserView;
19 class NativeBrowserFrame; 19 class NativeBrowserFrame;
20 class NonClientFrameView; 20 class NonClientFrameView;
21 class SystemMenuModelBuilder; 21 class SystemMenuModelBuilder;
22 22
23 namespace content {
24 struct NativeWebKeyboardEvent;
25 }
26
23 namespace gfx { 27 namespace gfx {
24 class FontList; 28 class FontList;
25 class Rect; 29 class Rect;
26 } 30 }
27 31
28 namespace ui { 32 namespace ui {
29 class EventHandler; 33 class EventHandler;
30 class MenuModel; 34 class MenuModel;
31 } 35 }
32 36
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // Returns |true| if we should use the custom frame. 89 // Returns |true| if we should use the custom frame.
86 bool UseCustomFrame() const; 90 bool UseCustomFrame() const;
87 91
88 // Returns true when the window placement should be saved. 92 // Returns true when the window placement should be saved.
89 bool ShouldSaveWindowPlacement() const; 93 bool ShouldSaveWindowPlacement() const;
90 94
91 // Retrieves the window placement (show state and bounds) for restoring. 95 // Retrieves the window placement (show state and bounds) for restoring.
92 void GetWindowPlacement(gfx::Rect* bounds, 96 void GetWindowPlacement(gfx::Rect* bounds,
93 ui::WindowShowState* show_state) const; 97 ui::WindowShowState* show_state) const;
94 98
99 // Returns true if the |event| was handled by the platform implementation
100 // before sending it to the renderer. E.g., it may be swallowed by a native
101 // menu bar.
102 bool PreHandleKeyboardEvent(const content::NativeWebKeyboardEvent& event);
sky 2016/11/08 18:34:10 Please use an enum for the return type to make the
103
104 // Returns true if the |event| was handled by the platform implementation,
105 // if the renderer did not process it.
106 bool HandleKeyboardEvent(const content::NativeWebKeyboardEvent& event);
107
95 // Called when BrowserView creates all it's child views. 108 // Called when BrowserView creates all it's child views.
96 void OnBrowserViewInitViewsComplete(); 109 void OnBrowserViewInitViewsComplete();
97 110
98 // Overridden from views::Widget: 111 // Overridden from views::Widget:
99 views::internal::RootView* CreateRootView() override; 112 views::internal::RootView* CreateRootView() override;
100 views::NonClientFrameView* CreateNonClientFrameView() override; 113 views::NonClientFrameView* CreateNonClientFrameView() override;
101 bool GetAccelerator(int command_id, 114 bool GetAccelerator(int command_id,
102 ui::Accelerator* accelerator) const override; 115 ui::Accelerator* accelerator) const override;
103 const ui::ThemeProvider* GetThemeProvider() const override; 116 const ui::ThemeProvider* GetThemeProvider() const override;
104 const ui::NativeTheme* GetNativeTheme() const override; 117 const ui::NativeTheme* GetNativeTheme() const override;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 // Used to show the system menu. Only used if 152 // Used to show the system menu. Only used if
140 // NativeBrowserFrame::UsesNativeSystemMenu() returns false. 153 // NativeBrowserFrame::UsesNativeSystemMenu() returns false.
141 std::unique_ptr<views::MenuRunner> menu_runner_; 154 std::unique_ptr<views::MenuRunner> menu_runner_;
142 155
143 std::unique_ptr<ui::EventHandler> browser_command_handler_; 156 std::unique_ptr<ui::EventHandler> browser_command_handler_;
144 157
145 DISALLOW_COPY_AND_ASSIGN(BrowserFrame); 158 DISALLOW_COPY_AND_ASSIGN(BrowserFrame);
146 }; 159 };
147 160
148 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_H_ 161 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698