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 <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/memory/ref_counted_memory.h" | 10 #include "base/memory/ref_counted_memory.h" |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
229 if (HasCustomImage(IDR_THEME_FRAME)) | 229 if (HasCustomImage(IDR_THEME_FRAME)) |
230 return false; | 230 return false; |
231 #if defined(OS_WIN) | 231 #if defined(OS_WIN) |
232 return ui::win::IsAeroGlassEnabled(); | 232 return ui::win::IsAeroGlassEnabled(); |
233 #else | 233 #else |
234 return false; | 234 return false; |
235 #endif | 235 #endif |
236 } | 236 } |
237 | 237 |
238 bool ThemeService::HasCustomImage(int id) const { | 238 bool ThemeService::HasCustomImage(int id) const { |
239 if (!Properties::IsThemeableImage(id)) | 239 if (!BrowserThemePack::IsPersistentImageID(id)) |
Peter Kasting
2014/12/03 22:08:38
Optional: While you're here, a shorter way would b
| |
240 return false; | 240 return false; |
241 | 241 |
242 if (theme_supplier_.get()) | 242 if (theme_supplier_.get()) |
243 return theme_supplier_->HasCustomImage(id); | 243 return theme_supplier_->HasCustomImage(id); |
244 | 244 |
245 return false; | 245 return false; |
246 } | 246 } |
247 | 247 |
248 base::RefCountedMemory* ThemeService::GetRawData( | 248 base::RefCountedMemory* ThemeService::GetRawData( |
249 int id, | 249 int id, |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
634 void ThemeService::OnInfobarDestroyed() { | 634 void ThemeService::OnInfobarDestroyed() { |
635 number_of_infobars_--; | 635 number_of_infobars_--; |
636 | 636 |
637 if (number_of_infobars_ == 0) | 637 if (number_of_infobars_ == 0) |
638 RemoveUnusedThemes(false); | 638 RemoveUnusedThemes(false); |
639 } | 639 } |
640 | 640 |
641 ThemeSyncableService* ThemeService::GetThemeSyncableService() const { | 641 ThemeSyncableService* ThemeService::GetThemeSyncableService() const { |
642 return theme_syncable_service_.get(); | 642 return theme_syncable_service_.get(); |
643 } | 643 } |
OLD | NEW |