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

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

Issue 2741004: Makes it so child views of menuitemview can be traversed with the (Closed)
Patch Set: Tweaks Created 10 years, 6 months 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ 5 #ifndef VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_
6 #define VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ 6 #define 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 bool OnKeyDown(int key_code, const MSG& msg); 196 bool OnKeyDown(int key_code, const MSG& msg);
197 #else 197 #else
198 bool OnKeyDown(int key_code); 198 bool OnKeyDown(int key_code);
199 #endif 199 #endif
200 200
201 // Creates a MenuController. If blocking is true, Run blocks the caller 201 // Creates a MenuController. If blocking is true, Run blocks the caller
202 explicit MenuController(bool blocking); 202 explicit MenuController(bool blocking);
203 203
204 ~MenuController(); 204 ~MenuController();
205 205
206 // If there is a hot tracked view AcceleratorPressed is invoked on it and
207 // true is returned.
208 bool SendAcceleratorToHotTrackedView();
209
206 void UpdateInitialLocation(const gfx::Rect& bounds, 210 void UpdateInitialLocation(const gfx::Rect& bounds,
207 MenuItemView::AnchorPosition position); 211 MenuItemView::AnchorPosition position);
208 212
209 // Invoked when the user accepts the selected item. This is only used 213 // Invoked when the user accepts the selected item. This is only used
210 // when blocking. This schedules the loop to quit. 214 // when blocking. This schedules the loop to quit.
211 void Accept(MenuItemView* item, int mouse_event_flags); 215 void Accept(MenuItemView* item, int mouse_event_flags);
212 216
213 bool ShowSiblingMenu(SubmenuView* source, const MouseEvent& e); 217 bool ShowSiblingMenu(SubmenuView* source, const MouseEvent& e);
214 218
215 // Closes all menus, including any menus of nested invocations of Run. 219 // Closes all menus, including any menus of nested invocations of Run.
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 scoped_ptr<MenuScrollTask> scroll_task_; 416 scoped_ptr<MenuScrollTask> scroll_task_;
413 417
414 MenuButton* menu_button_; 418 MenuButton* menu_button_;
415 419
416 DISALLOW_COPY_AND_ASSIGN(MenuController); 420 DISALLOW_COPY_AND_ASSIGN(MenuController);
417 }; 421 };
418 422
419 } // namespace views 423 } // namespace views
420 424
421 #endif // VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ 425 #endif // VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698