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

Side by Side Diff: ui/views/controls/menu/menu_controller.h

Issue 809773006: MacViews: Intercept events for Menus (after AppKit has interpreted keystrokes) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20141205-MacViews-AcceleratedWidget-PLUS-AddingLayers-fromcl-PLUS-bringup
Patch Set: rollback card unmask Created 6 years 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 UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_
6 #define UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ 6 #define UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #include <list> 10 #include <list>
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 153
154 // Called by the Widget when a drag is about to start on a child view. This 154 // Called by the Widget when a drag is about to start on a child view. This
155 // could be initiated by one of our MenuItemViews, or could be through another 155 // could be initiated by one of our MenuItemViews, or could be through another
156 // child View. 156 // child View.
157 void OnDragWillStart(); 157 void OnDragWillStart();
158 158
159 // Called by the Widget when the drag has completed. |should_close| 159 // Called by the Widget when the drag has completed. |should_close|
160 // corresponds to whether or not the menu should close. 160 // corresponds to whether or not the menu should close.
161 void OnDragComplete(bool should_close); 161 void OnDragComplete(bool should_close);
162 162
163 // Called while dispatching messages inside a menu run loop to intercept key
164 // events.
165 ui::PostDispatchAction OnWillDispatchEvent(const ui::Event& event);
166
163 // Update the submenu's selection based on the current mouse location 167 // Update the submenu's selection based on the current mouse location
164 void UpdateSubmenuSelection(SubmenuView* source); 168 void UpdateSubmenuSelection(SubmenuView* source);
165 169
166 // WidgetObserver overrides: 170 // WidgetObserver overrides:
167 void OnWidgetDestroying(Widget* widget) override; 171 void OnWidgetDestroying(Widget* widget) override;
168 172
169 // Only used for testing. 173 // Only used for testing.
170 bool IsCancelAllTimerRunningForTest(); 174 bool IsCancelAllTimerRunningForTest();
171 175
172 // Only used for testing. 176 // Only used for testing.
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 bool item_selected_by_touch_; 636 bool item_selected_by_touch_;
633 637
634 scoped_ptr<MenuMessageLoop> message_loop_; 638 scoped_ptr<MenuMessageLoop> message_loop_;
635 639
636 DISALLOW_COPY_AND_ASSIGN(MenuController); 640 DISALLOW_COPY_AND_ASSIGN(MenuController);
637 }; 641 };
638 642
639 } // namespace views 643 } // namespace views
640 644
641 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ 645 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698