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

Side by Side Diff: ui/base/native_theme/native_theme_aura.cc

Issue 10837317: Setting the touch wrench menu as default menu for ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed build problems Created 8 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
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/base/native_theme/native_theme_aura.h" 5 #include "ui/base/native_theme/native_theme_aura.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "grit/ui_resources.h" 8 #include "grit/ui_resources.h"
9 #include "ui/base/layout.h" 9 #include "ui/base/layout.h"
10 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
11 #include "ui/gfx/image/image_skia.h" 11 #include "ui/gfx/image/image_skia.h"
12 #include "ui/gfx/rect.h" 12 #include "ui/gfx/rect.h"
13 #include "ui/gfx/size.h" 13 #include "ui/gfx/size.h"
14 #include "ui/gfx/skbitmap_operations.h" 14 #include "ui/gfx/skbitmap_operations.h"
15 #include "ui/views/controls/menu/menu_config.h"
15 16
16 namespace { 17 namespace {
17 18
18 const SkColor kMenuBackgroundColor = SK_ColorWHITE; 19 const SkColor kMenuBackgroundColor = SK_ColorWHITE;
19 20
20 // Theme colors returned by GetSystemColor(). 21 // Theme colors returned by GetSystemColor().
21 const SkColor kInvalidColorIdColor = SkColorSetRGB(255, 0, 128); 22 const SkColor kInvalidColorIdColor = SkColorSetRGB(255, 0, 128);
22 // Dialogs: 23 // Dialogs:
23 const SkColor kDialogBackgroundColor = SK_ColorWHITE; 24 const SkColor kDialogBackgroundColor = SK_ColorWHITE;
24 // FocusableBorder: 25 // FocusableBorder:
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 return kTextButtonHoverColor; 101 return kTextButtonHoverColor;
101 102
102 // MenuItem 103 // MenuItem
103 case kColorId_EnabledMenuItemForegroundColor: 104 case kColorId_EnabledMenuItemForegroundColor:
104 return kEnabledMenuItemForegroundColor; 105 return kEnabledMenuItemForegroundColor;
105 case kColorId_DisabledMenuItemForegroundColor: 106 case kColorId_DisabledMenuItemForegroundColor:
106 return kDisabledMenuItemForegroundColor; 107 return kDisabledMenuItemForegroundColor;
107 case kColorId_FocusedMenuItemBackgroundColor: 108 case kColorId_FocusedMenuItemBackgroundColor:
108 return kFocusedMenuItemBackgroundColor; 109 return kFocusedMenuItemBackgroundColor;
109 case kColorId_MenuSeparatorColor: 110 case kColorId_MenuSeparatorColor:
110 return ui::GetDisplayLayout() == ui::LAYOUT_TOUCH ? 111 return views::MenuConfig::IsNewMenu() ?
111 kMenuSeparatorColorTouch : kMenuSeparatorColor; 112 kMenuSeparatorColorTouch : kMenuSeparatorColor;
112 113
113 // Label 114 // Label
114 case kColorId_LabelEnabledColor: 115 case kColorId_LabelEnabledColor:
115 return kLabelEnabledColor; 116 return kLabelEnabledColor;
116 case kColorId_LabelDisabledColor: 117 case kColorId_LabelDisabledColor:
117 return kLabelDisabledColor; 118 return kLabelDisabledColor;
118 case kColorId_LabelBackgroundColor: 119 case kColorId_LabelBackgroundColor:
119 return kLabelBackgroundColor; 120 return kLabelBackgroundColor;
120 121
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 DrawTiledImage(canvas, *center, 298 DrawTiledImage(canvas, *center,
298 0, 0, 1.0, 1.0, 299 0, 0, 1.0, 1.0,
299 rect.x() + left->width(), rect.y(), 300 rect.x() + left->width(), rect.y(),
300 rect.width() - left->width() - right->width(), 301 rect.width() - left->width() - right->width(),
301 center->height()); 302 center->height());
302 } 303 }
303 } 304 }
304 } 305 }
305 306
306 } // namespace ui 307 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698