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

Side by Side Diff: ui/views/controls/menu/menu_delegate.cc

Issue 399143004: Open the WrenchMenu on mouseover when dragging a browser action (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit 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 #include "ui/views/controls/menu/menu_delegate.h" 5 #include "ui/views/controls/menu/menu_delegate.h"
6 6
7 #include "ui/events/event.h" 7 #include "ui/events/event.h"
8 #include "ui/views/controls/menu/menu_config.h" 8 #include "ui/views/controls/menu/menu_config.h"
9 9
10 namespace views { 10 namespace views {
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 128
129 int MenuDelegate::GetDragOperations(MenuItemView* sender) { 129 int MenuDelegate::GetDragOperations(MenuItemView* sender) {
130 NOTREACHED() << "If you override CanDrag, you must override this too."; 130 NOTREACHED() << "If you override CanDrag, you must override this too.";
131 return 0; 131 return 0;
132 } 132 }
133 133
134 bool MenuDelegate::ShouldCloseOnDragComplete() { 134 bool MenuDelegate::ShouldCloseOnDragComplete() {
135 return true; 135 return true;
136 } 136 }
137 137
138 bool MenuDelegate::InNestedDrag() {
139 return false;
140 }
141
138 MenuItemView* MenuDelegate::GetSiblingMenu(MenuItemView* menu, 142 MenuItemView* MenuDelegate::GetSiblingMenu(MenuItemView* menu,
139 const gfx::Point& screen_point, 143 const gfx::Point& screen_point,
140 MenuAnchorPosition* anchor, 144 MenuAnchorPosition* anchor,
141 bool* has_mnemonics, 145 bool* has_mnemonics,
142 MenuButton** button) { 146 MenuButton** button) {
143 return NULL; 147 return NULL;
144 } 148 }
145 149
146 int MenuDelegate::GetMaxWidthForMenu(MenuItemView* menu) { 150 int MenuDelegate::GetMaxWidthForMenu(MenuItemView* menu) {
147 // NOTE: this needs to be large enough to accommodate the wrench menu with 151 // NOTE: this needs to be large enough to accommodate the wrench menu with
(...skipping 13 matching lines...) Expand all
161 int* right_margin) const { 165 int* right_margin) const {
162 *left_margin = 0; 166 *left_margin = 0;
163 *right_margin = 0; 167 *right_margin = 0;
164 } 168 }
165 169
166 bool MenuDelegate::ShouldReserveSpaceForSubmenuIndicator() const { 170 bool MenuDelegate::ShouldReserveSpaceForSubmenuIndicator() const {
167 return true; 171 return true;
168 } 172 }
169 173
170 } // namespace views 174 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698