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

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

Issue 11367041: Adds View::GetNativeTheme() to get the NativeTheme. The interesting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix include Created 8 years, 1 month 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/base/native_theme/native_theme_aura.h ('k') | ui/base/native_theme/native_theme_base.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/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"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 SkColorSetARGB(0x54, 0x60, 0xA8, 0xEB); 46 SkColorSetARGB(0x54, 0x60, 0xA8, 0xEB);
47 const SkColor kTextfieldSelectionBackgroundUnfocused = SK_ColorLTGRAY; 47 const SkColor kTextfieldSelectionBackgroundUnfocused = SK_ColorLTGRAY;
48 const SkColor kTextfieldSelectionColor = 48 const SkColor kTextfieldSelectionColor =
49 color_utils::AlphaBlend(SK_ColorBLACK, 49 color_utils::AlphaBlend(SK_ColorBLACK,
50 kTextfieldSelectionBackgroundFocused, 0xdd); 50 kTextfieldSelectionBackgroundFocused, 0xdd);
51 51
52 } // namespace 52 } // namespace
53 53
54 namespace ui { 54 namespace ui {
55 55
56 #if !defined(OS_WIN)
56 // static 57 // static
57 NativeTheme* NativeTheme::instance() { 58 NativeTheme* NativeTheme::instance() {
58 return NativeThemeAura::instance(); 59 return NativeThemeAura::instance();
59 } 60 }
61 #endif
60 62
61 // static 63 // static
62 NativeThemeAura* NativeThemeAura::instance() { 64 NativeThemeAura* NativeThemeAura::instance() {
63 CR_DEFINE_STATIC_LOCAL(NativeThemeAura, s_native_theme, ()); 65 CR_DEFINE_STATIC_LOCAL(NativeThemeAura, s_native_theme, ());
64 return &s_native_theme; 66 return &s_native_theme;
65 } 67 }
66 68
67 NativeThemeAura::NativeThemeAura() { 69 NativeThemeAura::NativeThemeAura() {
68 // We don't draw scrollbar buttons. 70 // We don't draw scrollbar buttons.
69 set_scrollbar_button_length(0); 71 set_scrollbar_button_length(0);
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 DrawTiledImage(canvas, *center, 289 DrawTiledImage(canvas, *center,
288 0, 0, 1.0, 1.0, 290 0, 0, 1.0, 1.0,
289 rect.x() + left->width(), rect.y(), 291 rect.x() + left->width(), rect.y(),
290 rect.width() - left->width() - right->width(), 292 rect.width() - left->width() - right->width(),
291 center->height()); 293 center->height());
292 } 294 }
293 } 295 }
294 } 296 }
295 297
296 } // namespace ui 298 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/native_theme/native_theme_aura.h ('k') | ui/base/native_theme/native_theme_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698