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

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

Issue 10824295: Rid the world of the last of views::Event types: TouchEvent, GestureEvent, MouseWheelEvent, ScrollE… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « ui/views/controls/link.cc ('k') | ui/views/controls/menu/menu_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // Various events, forwarded from the submenu. 108 // Various events, forwarded from the submenu.
109 // 109 //
110 // NOTE: the coordinates of the events are in that of the 110 // NOTE: the coordinates of the events are in that of the
111 // MenuScrollViewContainer. 111 // MenuScrollViewContainer.
112 void OnMousePressed(SubmenuView* source, const ui::MouseEvent& event); 112 void OnMousePressed(SubmenuView* source, const ui::MouseEvent& event);
113 void OnMouseDragged(SubmenuView* source, const ui::MouseEvent& event); 113 void OnMouseDragged(SubmenuView* source, const ui::MouseEvent& event);
114 void OnMouseReleased(SubmenuView* source, const ui::MouseEvent& event); 114 void OnMouseReleased(SubmenuView* source, const ui::MouseEvent& event);
115 void OnMouseMoved(SubmenuView* source, const ui::MouseEvent& event); 115 void OnMouseMoved(SubmenuView* source, const ui::MouseEvent& event);
116 void OnMouseEntered(SubmenuView* source, const ui::MouseEvent& event); 116 void OnMouseEntered(SubmenuView* source, const ui::MouseEvent& event);
117 #if defined(OS_LINUX) 117 #if defined(OS_LINUX)
118 bool OnMouseWheel(SubmenuView* source, const MouseWheelEvent& event); 118 bool OnMouseWheel(SubmenuView* source, const ui::MouseWheelEvent& event);
119 #endif 119 #endif
120 ui::GestureStatus OnGestureEvent(SubmenuView* source, 120 ui::GestureStatus OnGestureEvent(SubmenuView* source,
121 const GestureEvent& event); 121 const ui::GestureEvent& event);
122 122
123 bool GetDropFormats( 123 bool GetDropFormats(
124 SubmenuView* source, 124 SubmenuView* source,
125 int* formats, 125 int* formats,
126 std::set<ui::OSExchangeData::CustomFormat>* custom_formats); 126 std::set<ui::OSExchangeData::CustomFormat>* custom_formats);
127 bool AreDropTypesRequired(SubmenuView* source); 127 bool AreDropTypesRequired(SubmenuView* source);
128 bool CanDrop(SubmenuView* source, const ui::OSExchangeData& data); 128 bool CanDrop(SubmenuView* source, const ui::OSExchangeData& data);
129 void OnDragEntered(SubmenuView* source, const DropTargetEvent& event); 129 void OnDragEntered(SubmenuView* source, const ui::DropTargetEvent& event);
130 int OnDragUpdated(SubmenuView* source, const DropTargetEvent& event); 130 int OnDragUpdated(SubmenuView* source, const ui::DropTargetEvent& event);
131 void OnDragExited(SubmenuView* source); 131 void OnDragExited(SubmenuView* source);
132 int OnPerformDrop(SubmenuView* source, const DropTargetEvent& event); 132 int OnPerformDrop(SubmenuView* source, const ui::DropTargetEvent& event);
133 133
134 // Invoked from the scroll buttons of the MenuScrollViewContainer. 134 // Invoked from the scroll buttons of the MenuScrollViewContainer.
135 void OnDragEnteredScrollButton(SubmenuView* source, bool is_up); 135 void OnDragEnteredScrollButton(SubmenuView* source, bool is_up);
136 void OnDragExitedScrollButton(SubmenuView* source); 136 void OnDragExitedScrollButton(SubmenuView* source);
137 137
138 // Update the submenu's selection based on the current mouse location 138 // Update the submenu's selection based on the current mouse location
139 void UpdateSubmenuSelection(SubmenuView* source); 139 void UpdateSubmenuSelection(SubmenuView* source);
140 140
141 private: 141 private:
142 friend class internal::MenuRunnerImpl; 142 friend class internal::MenuRunnerImpl;
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 // How deep we are in nested message loops. This should be at most 2 (when 556 // How deep we are in nested message loops. This should be at most 2 (when
557 // showing a context menu from a menu). 557 // showing a context menu from a menu).
558 int message_loop_depth_; 558 int message_loop_depth_;
559 559
560 DISALLOW_COPY_AND_ASSIGN(MenuController); 560 DISALLOW_COPY_AND_ASSIGN(MenuController);
561 }; 561 };
562 562
563 } // namespace views 563 } // namespace views
564 564
565 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ 565 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ui/views/controls/link.cc ('k') | ui/views/controls/menu/menu_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698