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

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

Issue 1461923002: Change name of NativeTheme::instance() to make it clear it's web only. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: NATIVE_THEME_EXPORT for mac Created 5 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
« no previous file with comments | « ui/native_theme/native_theme.h ('k') | ui/native_theme/native_theme_android.cc » ('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.h" 5 #include "ui/native_theme/native_theme.h"
6 6
7 #include "ui/native_theme/native_theme_observer.h" 7 #include "ui/native_theme/native_theme_observer.h"
8 8
9 namespace ui { 9 namespace ui {
10 10
11 void NativeTheme::SetScrollbarColors(unsigned inactive_color, 11 void NativeTheme::SetScrollbarColors(unsigned inactive_color,
12 unsigned active_color, 12 unsigned active_color,
13 unsigned track_color) { 13 unsigned track_color) {
14 thumb_inactive_color_ = inactive_color; 14 thumb_inactive_color_ = inactive_color;
15 thumb_active_color_ = active_color; 15 thumb_active_color_ = active_color;
16 track_color_ = track_color; 16 track_color_ = track_color;
17 } 17 }
18 18
19 // NativeTheme::instance() is implemented in the platform specific source files,
20 // such as native_theme_win.cc or native_theme_linux.cc
21
22 void NativeTheme::AddObserver(NativeThemeObserver* observer) { 19 void NativeTheme::AddObserver(NativeThemeObserver* observer) {
23 native_theme_observers_.AddObserver(observer); 20 native_theme_observers_.AddObserver(observer);
24 } 21 }
25 22
26 void NativeTheme::RemoveObserver(NativeThemeObserver* observer) { 23 void NativeTheme::RemoveObserver(NativeThemeObserver* observer) {
27 native_theme_observers_.RemoveObserver(observer); 24 native_theme_observers_.RemoveObserver(observer);
28 } 25 }
29 26
30 void NativeTheme::NotifyObservers() { 27 void NativeTheme::NotifyObservers() {
31 FOR_EACH_OBSERVER(NativeThemeObserver, native_theme_observers_, 28 FOR_EACH_OBSERVER(NativeThemeObserver, native_theme_observers_,
32 OnNativeThemeUpdated(this)); 29 OnNativeThemeUpdated(this));
33 } 30 }
34 31
35 NativeTheme::NativeTheme() 32 NativeTheme::NativeTheme()
36 : thumb_inactive_color_(0xeaeaea), 33 : thumb_inactive_color_(0xeaeaea),
37 thumb_active_color_(0xf4f4f4), 34 thumb_active_color_(0xf4f4f4),
38 track_color_(0xd3d3d3) { 35 track_color_(0xd3d3d3) {
39 } 36 }
40 37
41 NativeTheme::~NativeTheme() {} 38 NativeTheme::~NativeTheme() {}
42 39
43 } // namespace ui 40 } // namespace ui
OLDNEW
« no previous file with comments | « ui/native_theme/native_theme.h ('k') | ui/native_theme/native_theme_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698