| 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 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 StringToAlignment(val); | 596 StringToAlignment(val); |
| 597 } else if (base::strcasecmp(WideToUTF8(*iter).c_str(), | 597 } else if (base::strcasecmp(WideToUTF8(*iter).c_str(), |
| 598 kDisplayPropertyNTPTiling) == 0) { | 598 kDisplayPropertyNTPTiling) == 0) { |
| 599 std::string val; | 599 std::string val; |
| 600 if (display_properties_value->GetString(*iter, &val)) | 600 if (display_properties_value->GetString(*iter, &val)) |
| 601 display_properties_[kDisplayPropertyNTPTiling] = | 601 display_properties_[kDisplayPropertyNTPTiling] = |
| 602 StringToTiling(val); | 602 StringToTiling(val); |
| 603 } | 603 } |
| 604 if (base::strcasecmp(WideToUTF8(*iter).c_str(), | 604 if (base::strcasecmp(WideToUTF8(*iter).c_str(), |
| 605 kDisplayPropertyNTPInverseLogo) == 0) { | 605 kDisplayPropertyNTPInverseLogo) == 0) { |
| 606 std::string val; | 606 int val = 0; |
| 607 if (display_properties_value->GetString(*iter, &val)) | 607 if (display_properties_value->GetInteger(*iter, &val)) |
| 608 display_properties_[kDisplayPropertyNTPInverseLogo] = StringToInt(val); | 608 display_properties_[kDisplayPropertyNTPInverseLogo] = val; |
| 609 } | 609 } |
| 610 ++iter; | 610 ++iter; |
| 611 } | 611 } |
| 612 } | 612 } |
| 613 | 613 |
| 614 // static | 614 // static |
| 615 int BrowserThemeProvider::StringToAlignment(const std::string& alignment) { | 615 int BrowserThemeProvider::StringToAlignment(const std::string& alignment) { |
| 616 std::vector<std::wstring> split; | 616 std::vector<std::wstring> split; |
| 617 SplitStringAlongWhitespace(UTF8ToWide(alignment), &split); | 617 SplitStringAlongWhitespace(UTF8ToWide(alignment), &split); |
| 618 | 618 |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 946 delete i->second; | 946 delete i->second; |
| 947 } | 947 } |
| 948 image_cache_.clear(); | 948 image_cache_.clear(); |
| 949 } | 949 } |
| 950 | 950 |
| 951 #if defined(TOOLKIT_VIEWS) | 951 #if defined(TOOLKIT_VIEWS) |
| 952 void BrowserThemeProvider::FreePlatformCaches() { | 952 void BrowserThemeProvider::FreePlatformCaches() { |
| 953 // Views (Skia) has no platform image cache to clear. | 953 // Views (Skia) has no platform image cache to clear. |
| 954 } | 954 } |
| 955 #endif | 955 #endif |
| OLD | NEW |