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

Side by Side Diff: ui/native_theme/common_theme.cc

Issue 14424007: Use the default theme as the fallback UI in Blink (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed static initializer Created 7 years, 7 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 | « no previous file | ui/native_theme/fallback_theme.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/native_theme/common_theme.h" 5 #include "ui/native_theme/common_theme.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 "third_party/skia/include/core/SkCanvas.h" 9 #include "third_party/skia/include/core/SkCanvas.h"
10 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
11 #include "ui/gfx/color_utils.h" 11 #include "ui/gfx/color_utils.h"
12 #include "ui/gfx/image/image_skia.h" 12 #include "ui/gfx/image/image_skia.h"
13 #include "ui/gfx/rect.h" 13 #include "ui/gfx/rect.h"
14 #include "ui/gfx/skia_util.h" 14 #include "ui/gfx/skia_util.h"
15 #include "ui/gfx/sys_color_change_listener.h" 15 #include "ui/gfx/sys_color_change_listener.h"
16 #include "ui/views/controls/menu/menu_config.h" 16 #include "ui/views/controls/menu/menu_config.h"
17 17
18 namespace { 18 namespace {
19 19
20 // Theme colors returned by GetSystemColor(). 20 // Theme colors returned by GetSystemColor().
21 21
22 // MenuItem: 22 // MenuItem:
23 const SkColor kMenuBackgroundColor = SK_ColorWHITE; 23 const SkColor kMenuBackgroundColor = SK_ColorWHITE;
24 const SkColor kMenuHighlightBackgroundColor = SkColorSetA(SK_ColorBLACK, 15); 24 const SkColor kMenuHighlightBackgroundColor = SkColorSetARGB(15, 0, 0, 0);
25 const SkColor kMenuHighlightBackgroundColor2 = SkColorSetRGB(0x42, 0x81, 0xF4); 25 const SkColor kMenuHighlightBackgroundColor2 = SkColorSetRGB(0x42, 0x81, 0xF4);
26 const SkColor kMenuInvertedSchemeHighlightBackgroundColor = 26 const SkColor kMenuInvertedSchemeHighlightBackgroundColor =
27 SkColorSetRGB(48, 48, 48); 27 SkColorSetRGB(48, 48, 48);
28 const SkColor kMenuBorderColor = SkColorSetRGB(0xBA, 0xBA, 0xBA); 28 const SkColor kMenuBorderColor = SkColorSetRGB(0xBA, 0xBA, 0xBA);
29 const SkColor kEnabledMenuButtonBorderColor = SkColorSetARGB(36, 0, 0, 0); 29 const SkColor kEnabledMenuButtonBorderColor = SkColorSetARGB(36, 0, 0, 0);
30 const SkColor kFocusedMenuButtonBorderColor = SkColorSetARGB(72, 0, 0, 0); 30 const SkColor kFocusedMenuButtonBorderColor = SkColorSetARGB(72, 0, 0, 0);
31 const SkColor kHoverMenuButtonBorderColor = SkColorSetARGB(72, 0, 0, 0); 31 const SkColor kHoverMenuButtonBorderColor = SkColorSetARGB(72, 0, 0, 0);
32 const SkColor kMenuSeparatorColor = SkColorSetRGB(0xE9, 0xE9, 0xE9); 32 const SkColor kMenuSeparatorColor = SkColorSetRGB(0xE9, 0xE9, 0xE9);
33 const SkColor kEnabledMenuItemForegroundColor = SK_ColorBLACK; 33 const SkColor kEnabledMenuItemForegroundColor = SK_ColorBLACK;
34 const SkColor kDisabledMenuItemForegroundColor = SkColorSetRGB(161, 161, 146); 34 const SkColor kDisabledMenuItemForegroundColor = SkColorSetRGB(161, 161, 146);
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 case NativeTheme::kColorId_FocusedMenuItemBackgroundColor: 177 case NativeTheme::kColorId_FocusedMenuItemBackgroundColor:
178 return kMenuHighlightBackgroundColor2; 178 return kMenuHighlightBackgroundColor2;
179 case NativeTheme::kColorId_SelectedMenuItemForegroundColor: 179 case NativeTheme::kColorId_SelectedMenuItemForegroundColor:
180 return SK_ColorWHITE; 180 return SK_ColorWHITE;
181 default: 181 default:
182 return color; 182 return color;
183 } 183 }
184 } 184 }
185 185
186 } // namespace ui 186 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | ui/native_theme/fallback_theme.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698