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

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

Issue 7477008: Remove explicit keyword from multi-argument constructors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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/gfx/gl/gl_surface_osmesa.h ('k') | views/widget/drop_target_gtk.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/menu_scroll_view_container.h" 5 #include "views/controls/menu/menu_scroll_view_container.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <uxtheme.h> 9 #include <uxtheme.h>
10 #include <Vssym32.h> 10 #include <Vssym32.h>
(...skipping 24 matching lines...) Expand all
35 namespace { 35 namespace {
36 36
37 // MenuScrollButton ------------------------------------------------------------ 37 // MenuScrollButton ------------------------------------------------------------
38 38
39 // MenuScrollButton is used for the scroll buttons when not all menu items fit 39 // MenuScrollButton is used for the scroll buttons when not all menu items fit
40 // on screen. MenuScrollButton forwards appropriate events to the 40 // on screen. MenuScrollButton forwards appropriate events to the
41 // MenuController. 41 // MenuController.
42 42
43 class MenuScrollButton : public View { 43 class MenuScrollButton : public View {
44 public: 44 public:
45 explicit MenuScrollButton(SubmenuView* host, bool is_up) 45 MenuScrollButton(SubmenuView* host, bool is_up)
46 : host_(host), 46 : host_(host),
47 is_up_(is_up), 47 is_up_(is_up),
48 // Make our height the same as that of other MenuItemViews. 48 // Make our height the same as that of other MenuItemViews.
49 pref_height_(MenuItemView::pref_menu_height()) { 49 pref_height_(MenuItemView::pref_menu_height()) {
50 } 50 }
51 51
52 virtual gfx::Size GetPreferredSize() { 52 virtual gfx::Size GetPreferredSize() {
53 return gfx::Size(MenuConfig::instance().scroll_arrow_height * 2 - 1, 53 return gfx::Size(MenuConfig::instance().scroll_arrow_height * 2 - 1,
54 pref_height_); 54 pref_height_);
55 } 55 }
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 272
273 void MenuScrollViewContainer::OnBoundsChanged( 273 void MenuScrollViewContainer::OnBoundsChanged(
274 const gfx::Rect& previous_bounds) { 274 const gfx::Rect& previous_bounds) {
275 gfx::Size content_pref = scroll_view_->GetContents()->GetPreferredSize(); 275 gfx::Size content_pref = scroll_view_->GetContents()->GetPreferredSize();
276 scroll_up_button_->SetVisible(content_pref.height() > height()); 276 scroll_up_button_->SetVisible(content_pref.height() > height());
277 scroll_down_button_->SetVisible(content_pref.height() > height()); 277 scroll_down_button_->SetVisible(content_pref.height() > height());
278 Layout(); 278 Layout();
279 } 279 }
280 280
281 } // namespace views 281 } // namespace views
OLDNEW
« no previous file with comments | « ui/gfx/gl/gl_surface_osmesa.h ('k') | views/widget/drop_target_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698