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

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

Issue 378333003: Allow menus to stay open during a child view's drag and drop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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) 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 bool CanDrop(SubmenuView* source, const ui::OSExchangeData& data); 135 bool CanDrop(SubmenuView* source, const ui::OSExchangeData& data);
136 void OnDragEntered(SubmenuView* source, const ui::DropTargetEvent& event); 136 void OnDragEntered(SubmenuView* source, const ui::DropTargetEvent& event);
137 int OnDragUpdated(SubmenuView* source, const ui::DropTargetEvent& event); 137 int OnDragUpdated(SubmenuView* source, const ui::DropTargetEvent& event);
138 void OnDragExited(SubmenuView* source); 138 void OnDragExited(SubmenuView* source);
139 int OnPerformDrop(SubmenuView* source, const ui::DropTargetEvent& event); 139 int OnPerformDrop(SubmenuView* source, const ui::DropTargetEvent& event);
140 140
141 // Invoked from the scroll buttons of the MenuScrollViewContainer. 141 // Invoked from the scroll buttons of the MenuScrollViewContainer.
142 void OnDragEnteredScrollButton(SubmenuView* source, bool is_up); 142 void OnDragEnteredScrollButton(SubmenuView* source, bool is_up);
143 void OnDragExitedScrollButton(SubmenuView* source); 143 void OnDragExitedScrollButton(SubmenuView* source);
144 144
145 // Called by the Widget when a drag is about to start on a child view. This
146 // could be initiated by one of our MenuItemViews, or could be through another
147 // child View.
148 void OnDragWillStart();
149
150 // Called by the Widget when the drag has completed. |should_close|
151 // corresponds to whether or not the menu should close.
152 void OnDragComplete(bool should_close);
153
145 // Update the submenu's selection based on the current mouse location 154 // Update the submenu's selection based on the current mouse location
146 void UpdateSubmenuSelection(SubmenuView* source); 155 void UpdateSubmenuSelection(SubmenuView* source);
147 156
148 // WidgetObserver overrides: 157 // WidgetObserver overrides:
149 virtual void OnWidgetDestroying(Widget* widget) OVERRIDE; 158 virtual void OnWidgetDestroying(Widget* widget) OVERRIDE;
150 159
151 // Only used for testing. 160 // Only used for testing.
152 static void TurnOffMenuSelectionHoldForTest(); 161 static void TurnOffMenuSelectionHoldForTest();
153 162
154 private: 163 private:
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 bool item_selected_by_touch_; 613 bool item_selected_by_touch_;
605 614
606 scoped_ptr<MenuMessageLoop> message_loop_; 615 scoped_ptr<MenuMessageLoop> message_loop_;
607 616
608 DISALLOW_COPY_AND_ASSIGN(MenuController); 617 DISALLOW_COPY_AND_ASSIGN(MenuController);
609 }; 618 };
610 619
611 } // namespace views 620 } // namespace views
612 621
613 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ 622 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698