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

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

Issue 8771006: views: Move the remaining file from views/ to ui/views/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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_model_adapter.cc ('k') | ui/views/controls/menu/menu_wrapper.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 "ui/views/controls/menu/menu_scroll_view_container.h" 5 #include "ui/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>
11 #endif 11 #endif
12 12
13 #include "ui/base/accessibility/accessible_view_state.h" 13 #include "ui/base/accessibility/accessible_view_state.h"
14 #include "ui/gfx/canvas_skia.h" 14 #include "ui/gfx/canvas_skia.h"
15 #include "ui/gfx/color_utils.h" 15 #include "ui/gfx/color_utils.h"
16 #include "ui/gfx/native_theme.h" 16 #include "ui/gfx/native_theme.h"
17 #include "ui/views/border.h"
17 #include "ui/views/controls/menu/menu_config.h" 18 #include "ui/views/controls/menu/menu_config.h"
18 #include "ui/views/controls/menu/menu_controller.h" 19 #include "ui/views/controls/menu/menu_controller.h"
19 #include "ui/views/controls/menu/menu_item_view.h" 20 #include "ui/views/controls/menu/menu_item_view.h"
20 #include "ui/views/controls/menu/submenu_view.h" 21 #include "ui/views/controls/menu/submenu_view.h"
21 #include "views/border.h"
22 22
23 using gfx::NativeTheme; 23 using gfx::NativeTheme;
24 24
25 // Height of the scroll arrow. 25 // Height of the scroll arrow.
26 // This goes up to 4 with large fonts, but this is close enough for now. 26 // This goes up to 4 with large fonts, but this is close enough for now.
27 static const int scroll_arrow_height = 3; 27 static const int scroll_arrow_height = 3;
28 28
29 namespace views { 29 namespace views {
30 30
31 namespace { 31 namespace {
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 238
239 void MenuScrollViewContainer::OnBoundsChanged( 239 void MenuScrollViewContainer::OnBoundsChanged(
240 const gfx::Rect& previous_bounds) { 240 const gfx::Rect& previous_bounds) {
241 gfx::Size content_pref = scroll_view_->GetContents()->GetPreferredSize(); 241 gfx::Size content_pref = scroll_view_->GetContents()->GetPreferredSize();
242 scroll_up_button_->SetVisible(content_pref.height() > height()); 242 scroll_up_button_->SetVisible(content_pref.height() > height());
243 scroll_down_button_->SetVisible(content_pref.height() > height()); 243 scroll_down_button_->SetVisible(content_pref.height() > height());
244 Layout(); 244 Layout();
245 } 245 }
246 246
247 } // namespace views 247 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/menu/menu_model_adapter.cc ('k') | ui/views/controls/menu/menu_wrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698