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_delegate.cc

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: Test Fix 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
« no previous file with comments | « ui/views/controls/menu/menu_delegate.h ('k') | ui/views/controls/menu/menu_host.h » ('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 #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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 124
125 void MenuDelegate::WriteDragData(MenuItemView* sender, OSExchangeData* data) { 125 void MenuDelegate::WriteDragData(MenuItemView* sender, OSExchangeData* data) {
126 NOTREACHED() << "If you override CanDrag, you must override this too."; 126 NOTREACHED() << "If you override CanDrag, you must override this too.";
127 } 127 }
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() {
135 return true;
136 }
137
134 MenuItemView* MenuDelegate::GetSiblingMenu(MenuItemView* menu, 138 MenuItemView* MenuDelegate::GetSiblingMenu(MenuItemView* menu,
135 const gfx::Point& screen_point, 139 const gfx::Point& screen_point,
136 MenuAnchorPosition* anchor, 140 MenuAnchorPosition* anchor,
137 bool* has_mnemonics, 141 bool* has_mnemonics,
138 MenuButton** button) { 142 MenuButton** button) {
139 return NULL; 143 return NULL;
140 } 144 }
141 145
142 int MenuDelegate::GetMaxWidthForMenu(MenuItemView* menu) { 146 int MenuDelegate::GetMaxWidthForMenu(MenuItemView* menu) {
143 // NOTE: this needs to be large enough to accommodate the wrench menu with 147 // NOTE: this needs to be large enough to accommodate the wrench menu with
(...skipping 13 matching lines...) Expand all
157 int* right_margin) const { 161 int* right_margin) const {
158 *left_margin = 0; 162 *left_margin = 0;
159 *right_margin = 0; 163 *right_margin = 0;
160 } 164 }
161 165
162 bool MenuDelegate::ShouldReserveSpaceForSubmenuIndicator() const { 166 bool MenuDelegate::ShouldReserveSpaceForSubmenuIndicator() const {
163 return true; 167 return true;
164 } 168 }
165 169
166 } // namespace views 170 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/menu/menu_delegate.h ('k') | ui/views/controls/menu/menu_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698