| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/browser_theme_provider.h" | 5 #include "chrome/browser/browser_theme_provider.h" |
| 6 | 6 |
| 7 #include "base/gfx/png_decoder.h" | 7 #include "base/gfx/png_decoder.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/browser_list.h" | 10 #include "chrome/browser/browser_list.h" |
| (...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 | 549 |
| 550 if (!vertical_string.empty() && !horizontal_string.empty()) | 550 if (!vertical_string.empty() && !horizontal_string.empty()) |
| 551 return vertical_string + " " + horizontal_string; | 551 return vertical_string + " " + horizontal_string; |
| 552 else if (vertical_string.empty()) | 552 else if (vertical_string.empty()) |
| 553 return horizontal_string; | 553 return horizontal_string; |
| 554 else | 554 else |
| 555 return vertical_string; | 555 return vertical_string; |
| 556 } | 556 } |
| 557 | 557 |
| 558 void BrowserThemeProvider::SetColor(const char* key, const SkColor& color) { | 558 void BrowserThemeProvider::SetColor(const char* key, const SkColor& color) { |
| 559 colors_[kColorFrame] = color; | 559 colors_[key] = color; |
| 560 } | 560 } |
| 561 | 561 |
| 562 void BrowserThemeProvider::SetTint(const char* key, const skia::HSL& tint) { | 562 void BrowserThemeProvider::SetTint(const char* key, const skia::HSL& tint) { |
| 563 tints_[key] = tint; | 563 tints_[key] = tint; |
| 564 } | 564 } |
| 565 | 565 |
| 566 void BrowserThemeProvider::GenerateFrameColors() { | 566 void BrowserThemeProvider::GenerateFrameColors() { |
| 567 // Generate any secondary frame colors that weren't provided. | 567 // Generate any secondary frame colors that weren't provided. |
| 568 skia::HSL frame_hsl = { 0, 0, 0 }; | 568 skia::HSL frame_hsl = { 0, 0, 0 }; |
| 569 skia::SkColorToHSL(GetColor(COLOR_FRAME), frame_hsl); | 569 skia::SkColorToHSL(GetColor(COLOR_FRAME), frame_hsl); |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 774 delete i->second; | 774 delete i->second; |
| 775 } | 775 } |
| 776 image_cache_.clear(); | 776 image_cache_.clear(); |
| 777 } | 777 } |
| 778 | 778 |
| 779 #if defined(TOOLKIT_VIEWS) | 779 #if defined(TOOLKIT_VIEWS) |
| 780 void BrowserThemeProvider::FreePlatformCaches() { | 780 void BrowserThemeProvider::FreePlatformCaches() { |
| 781 // Views (Skia) has no platform image cache to clear. | 781 // Views (Skia) has no platform image cache to clear. |
| 782 } | 782 } |
| 783 #endif | 783 #endif |
| OLD | NEW |