OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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> |
11 #endif | 11 #endif |
12 | 12 |
13 #include "app/gfx/canvas.h" | 13 #include "app/gfx/canvas.h" |
14 #include "app/gfx/color_utils.h" | 14 #include "app/gfx/color_utils.h" |
15 #include "views/border.h" | 15 #include "views/border.h" |
16 #include "views/controls/menu/menu_config.h" | 16 #include "views/controls/menu/menu_config.h" |
17 #include "views/controls/menu/menu_controller.h" | 17 #include "views/controls/menu/menu_controller.h" |
18 #include "views/controls/menu/menu_item_view.h" | 18 #include "views/controls/menu/menu_item_view.h" |
19 #include "views/controls/menu/submenu_view.h" | 19 #include "views/controls/menu/submenu_view.h" |
20 | 20 |
21 #if defined(OS_WIN) | 21 #if defined(OS_WIN) |
22 #include "base/gfx/native_theme.h" | 22 #include "app/gfx/native_theme_win.h" |
23 #endif | 23 #endif |
24 | 24 |
25 #if defined(OS_WIN) | 25 #if defined(OS_WIN) |
26 using gfx::NativeTheme; | 26 using gfx::NativeTheme; |
27 #endif | 27 #endif |
28 | 28 |
29 // Height of the scroll arrow. | 29 // Height of the scroll arrow. |
30 // This goes up to 4 with large fonts, but this is close enough for now. | 30 // This goes up to 4 with large fonts, but this is close enough for now. |
31 static const int scroll_arrow_height = 3; | 31 static const int scroll_arrow_height = 3; |
32 | 32 |
(...skipping 193 matching lines...) Loading... |
226 } | 226 } |
227 | 227 |
228 gfx::Size MenuScrollViewContainer::GetPreferredSize() { | 228 gfx::Size MenuScrollViewContainer::GetPreferredSize() { |
229 gfx::Size prefsize = scroll_view_->GetContents()->GetPreferredSize(); | 229 gfx::Size prefsize = scroll_view_->GetContents()->GetPreferredSize(); |
230 gfx::Insets insets = GetInsets(); | 230 gfx::Insets insets = GetInsets(); |
231 prefsize.Enlarge(insets.width(), insets.height()); | 231 prefsize.Enlarge(insets.width(), insets.height()); |
232 return prefsize; | 232 return prefsize; |
233 } | 233 } |
234 | 234 |
235 } // namespace views | 235 } // namespace views |
OLD | NEW |