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

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

Issue 250943008: Move enum MenuAnchorPosition to reduce deps on menu_item_view.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix indent Created 6 years, 7 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/menu/menu_types.h ('k') | ui/views/controls/scrollbar/base_scroll_bar.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 #include "ui/views/controls/menu/submenu_view.h" 5 #include "ui/views/controls/menu/submenu_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "ui/accessibility/ax_view_state.h" 10 #include "ui/accessibility/ax_view_state.h"
11 #include "ui/events/event.h" 11 #include "ui/events/event.h"
12 #include "ui/gfx/canvas.h" 12 #include "ui/gfx/canvas.h"
13 #include "ui/gfx/geometry/safe_integer_conversions.h" 13 #include "ui/gfx/geometry/safe_integer_conversions.h"
14 #include "ui/views/controls/menu/menu_config.h" 14 #include "ui/views/controls/menu/menu_config.h"
15 #include "ui/views/controls/menu/menu_controller.h" 15 #include "ui/views/controls/menu/menu_controller.h"
16 #include "ui/views/controls/menu/menu_host.h" 16 #include "ui/views/controls/menu/menu_host.h"
17 #include "ui/views/controls/menu/menu_item_view.h"
17 #include "ui/views/controls/menu/menu_scroll_view_container.h" 18 #include "ui/views/controls/menu/menu_scroll_view_container.h"
18 #include "ui/views/widget/root_view.h" 19 #include "ui/views/widget/root_view.h"
19 #include "ui/views/widget/widget.h" 20 #include "ui/views/widget/widget.h"
20 21
21 namespace { 22 namespace {
22 23
23 // Height of the drop indicator. This should be an even number. 24 // Height of the drop indicator. This should be an even number.
24 const int kDropIndicatorHeight = 2; 25 const int kDropIndicatorHeight = 2;
25 26
26 // Color of the drop indicator. 27 // Color of the drop indicator.
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 y = std::max(y, 0); 491 y = std::max(y, 0);
491 gfx::Rect new_vis_bounds(x, y, vis_bounds.width(), vis_bounds.height()); 492 gfx::Rect new_vis_bounds(x, y, vis_bounds.width(), vis_bounds.height());
492 if (new_vis_bounds != vis_bounds) { 493 if (new_vis_bounds != vis_bounds) {
493 ScrollRectToVisible(new_vis_bounds); 494 ScrollRectToVisible(new_vis_bounds);
494 return true; 495 return true;
495 } 496 }
496 return false; 497 return false;
497 } 498 }
498 499
499 } // namespace views 500 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/menu/menu_types.h ('k') | ui/views/controls/scrollbar/base_scroll_bar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698