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

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

Issue 2289143004: Add ink drop ripple (but no highlight) to comboboxes in harmony. (Closed)
Patch Set: remove explicit and improve combobox example Created 4 years, 3 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/submenu_view.h ('k') | ui/views/controls/prefix_delegate.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/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"
(...skipping 29 matching lines...) Expand all
40 : parent_menu_item_(parent), 40 : parent_menu_item_(parent),
41 host_(NULL), 41 host_(NULL),
42 drop_item_(NULL), 42 drop_item_(NULL),
43 drop_position_(MenuDelegate::DROP_NONE), 43 drop_position_(MenuDelegate::DROP_NONE),
44 scroll_view_container_(NULL), 44 scroll_view_container_(NULL),
45 max_minor_text_width_(0), 45 max_minor_text_width_(0),
46 minimum_preferred_width_(0), 46 minimum_preferred_width_(0),
47 resize_open_menu_(false), 47 resize_open_menu_(false),
48 scroll_animator_(new ScrollAnimator(this)), 48 scroll_animator_(new ScrollAnimator(this)),
49 roundoff_error_(0), 49 roundoff_error_(0),
50 prefix_selector_(this) { 50 prefix_selector_(this, this) {
51 DCHECK(parent); 51 DCHECK(parent);
52 // We'll delete ourselves, otherwise the ScrollView would delete us on close. 52 // We'll delete ourselves, otherwise the ScrollView would delete us on close.
53 set_owned_by_client(); 53 set_owned_by_client();
54 } 54 }
55 55
56 SubmenuView::~SubmenuView() { 56 SubmenuView::~SubmenuView() {
57 // The menu may not have been closed yet (it will be hidden, but not 57 // The menu may not have been closed yet (it will be hidden, but not
58 // necessarily closed). 58 // necessarily closed).
59 Close(); 59 Close();
60 60
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 y = std::max(y, 0); 509 y = std::max(y, 0);
510 gfx::Rect new_vis_bounds(x, y, vis_bounds.width(), vis_bounds.height()); 510 gfx::Rect new_vis_bounds(x, y, vis_bounds.width(), vis_bounds.height());
511 if (new_vis_bounds != vis_bounds) { 511 if (new_vis_bounds != vis_bounds) {
512 ScrollRectToVisible(new_vis_bounds); 512 ScrollRectToVisible(new_vis_bounds);
513 return true; 513 return true;
514 } 514 }
515 return false; 515 return false;
516 } 516 }
517 517
518 } // namespace views 518 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/menu/submenu_view.h ('k') | ui/views/controls/prefix_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698