OLD | NEW |
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 "chrome/browser/themes/theme_service.h" | 5 #include "chrome/browser/themes/theme_service.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/ref_counted_memory.h" | 8 #include "base/memory/ref_counted_memory.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 gfx::Image image; | 112 gfx::Image image; |
113 if (theme_supplier_.get()) | 113 if (theme_supplier_.get()) |
114 image = theme_supplier_->GetImageNamed(id); | 114 image = theme_supplier_->GetImageNamed(id); |
115 | 115 |
116 if (image.IsEmpty()) | 116 if (image.IsEmpty()) |
117 image = rb_.GetNativeImageNamed(id); | 117 image = rb_.GetNativeImageNamed(id); |
118 | 118 |
119 return image; | 119 return image; |
120 } | 120 } |
121 | 121 |
| 122 bool ThemeService::IsSystemThemeDistinctFromDefaultTheme() const { |
| 123 return false; |
| 124 } |
| 125 |
122 bool ThemeService::UsingSystemTheme() const { | 126 bool ThemeService::UsingSystemTheme() const { |
123 return UsingDefaultTheme(); | 127 return UsingDefaultTheme(); |
124 } | 128 } |
125 | 129 |
126 gfx::ImageSkia* ThemeService::GetImageSkiaNamed(int id) const { | 130 gfx::ImageSkia* ThemeService::GetImageSkiaNamed(int id) const { |
127 gfx::Image image = GetImageNamed(id); | 131 gfx::Image image = GetImageNamed(id); |
128 if (image.IsEmpty()) | 132 if (image.IsEmpty()) |
129 return NULL; | 133 return NULL; |
130 // TODO(pkotwicz): Remove this const cast. The gfx::Image interface returns | 134 // TODO(pkotwicz): Remove this const cast. The gfx::Image interface returns |
131 // its images const. GetImageSkiaNamed() also should but has many callsites. | 135 // its images const. GetImageSkiaNamed() also should but has many callsites. |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 void ThemeService::OnInfobarDestroyed() { | 604 void ThemeService::OnInfobarDestroyed() { |
601 number_of_infobars_--; | 605 number_of_infobars_--; |
602 | 606 |
603 if (number_of_infobars_ == 0) | 607 if (number_of_infobars_ == 0) |
604 RemoveUnusedThemes(false); | 608 RemoveUnusedThemes(false); |
605 } | 609 } |
606 | 610 |
607 ThemeSyncableService* ThemeService::GetThemeSyncableService() const { | 611 ThemeSyncableService* ThemeService::GetThemeSyncableService() const { |
608 return theme_syncable_service_.get(); | 612 return theme_syncable_service_.get(); |
609 } | 613 } |
OLD | NEW |