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

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

Issue 2290743002: Partial revert of https://codereview.chromium.org/1911973002/ (Closed)
Patch Set: mac libtool Created 4 years, 3 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
« no previous file with comments | « ui/native_theme/BUILD.gn ('k') | ui/native_theme/native_theme_aurawin.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/native_theme_aura.h" 5 #include "ui/native_theme/native_theme_aura.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 } 60 }
61 61
62 NOTREACHED(); 62 NOTREACHED();
63 return 0xFF; 63 return 0xFF;
64 } 64 }
65 65
66 const SkColor kTrackColor = SkColorSetRGB(0xF1, 0xF1, 0xF1); 66 const SkColor kTrackColor = SkColorSetRGB(0xF1, 0xF1, 0xF1);
67 67
68 } // namespace 68 } // namespace
69 69
70 #if !defined(OS_WIN)
71 // static 70 // static
72 NativeTheme* NativeTheme::GetInstanceForWeb() { 71 NativeTheme* NativeTheme::GetInstanceForWeb() {
73 return NativeThemeAura::instance(); 72 return NativeThemeAura::instance();
74 } 73 }
75 74
76 // static 75 // static
77 NativeThemeAura* NativeThemeAura::instance() { 76 NativeThemeAura* NativeThemeAura::instance() {
78 CR_DEFINE_STATIC_LOCAL(NativeThemeAura, s_native_theme, ()); 77 CR_DEFINE_STATIC_LOCAL(NativeThemeAura, s_native_theme, ());
79 return &s_native_theme; 78 return &s_native_theme;
80 } 79 }
81 #endif
82 80
83 NativeThemeAura::NativeThemeAura() { 81 NativeThemeAura::NativeThemeAura() {
84 // We don't draw scrollbar buttons. 82 // We don't draw scrollbar buttons.
85 #if defined(OS_CHROMEOS) 83 #if defined(OS_CHROMEOS)
86 set_scrollbar_button_length(0); 84 set_scrollbar_button_length(0);
87 #endif 85 #endif
88 86
89 // Images and alphas declarations assume the following order. 87 // Images and alphas declarations assume the following order.
90 static_assert(kDisabled == 0, "states unexpectedly changed"); 88 static_assert(kDisabled == 0, "states unexpectedly changed");
91 static_assert(kHovered == 1, "states unexpectedly changed"); 89 static_assert(kHovered == 1, "states unexpectedly changed");
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 State state, 233 State state,
236 const gfx::Rect& rect) const { 234 const gfx::Rect& rect) const {
237 // Overlay Scrollbar should never paint a scrollbar corner. 235 // Overlay Scrollbar should never paint a scrollbar corner.
238 DCHECK(!IsOverlayScrollbarEnabled()); 236 DCHECK(!IsOverlayScrollbarEnabled());
239 SkPaint paint; 237 SkPaint paint;
240 paint.setColor(SkColorSetRGB(0xDC, 0xDC, 0xDC)); 238 paint.setColor(SkColorSetRGB(0xDC, 0xDC, 0xDC));
241 canvas->drawIRect(RectToSkIRect(rect), paint); 239 canvas->drawIRect(RectToSkIRect(rect), paint);
242 } 240 }
243 241
244 } // namespace ui 242 } // namespace ui
OLDNEW
« no previous file with comments | « ui/native_theme/BUILD.gn ('k') | ui/native_theme/native_theme_aurawin.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698