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

Side by Side Diff: views/controls/menu/submenu_view.cc

Issue 328012: Makes it so that when a folder is open on the bookmark bar and the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 | « views/controls/menu/menu_item_view.cc ('k') | views/screen.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "views/controls/menu/submenu_view.h" 5 #include "views/controls/menu/submenu_view.h"
6 6
7 #include "app/gfx/canvas.h" 7 #include "app/gfx/canvas.h"
8 #include "views/controls/menu/menu_controller.h" 8 #include "views/controls/menu/menu_controller.h"
9 #include "views/controls/menu/menu_scroll_view_container.h" 9 #include "views/controls/menu/menu_scroll_view_container.h"
10 #include "views/widget/root_view.h" 10 #include "views/widget/root_view.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 214
215 bool SubmenuView::IsShowing() { 215 bool SubmenuView::IsShowing() {
216 return host_ && host_->IsVisible(); 216 return host_ && host_->IsVisible();
217 } 217 }
218 218
219 void SubmenuView::ShowAt(gfx::NativeWindow parent, 219 void SubmenuView::ShowAt(gfx::NativeWindow parent,
220 const gfx::Rect& bounds, 220 const gfx::Rect& bounds,
221 bool do_capture) { 221 bool do_capture) {
222 if (host_) { 222 if (host_) {
223 host_->Show(); 223 host_->Show();
224 if (do_capture)
225 host_->DoCapture();
224 return; 226 return;
225 } 227 }
226 228
227 host_ = new MenuHost(this); 229 host_ = new MenuHost(this);
228 // Force construction of the scroll view container. 230 // Force construction of the scroll view container.
229 GetScrollViewContainer(); 231 GetScrollViewContainer();
230 // Make sure the first row is visible. 232 // Make sure the first row is visible.
231 ScrollRectToVisible(0, 0, 1, 1); 233 ScrollRectToVisible(0, 0, 1, 1);
232 host_->Init(parent, bounds, scroll_view_container_, do_capture); 234 host_->Init(parent, bounds, scroll_view_container_, do_capture);
233 } 235 }
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 item_bounds.set_height(kDropIndicatorHeight); 327 item_bounds.set_height(kDropIndicatorHeight);
326 return item_bounds; 328 return item_bounds;
327 329
328 default: 330 default:
329 // Don't render anything for on. 331 // Don't render anything for on.
330 return gfx::Rect(); 332 return gfx::Rect();
331 } 333 }
332 } 334 }
333 335
334 } // namespace views 336 } // namespace views
OLDNEW
« no previous file with comments | « views/controls/menu/menu_item_view.cc ('k') | views/screen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698