| 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 "browser_theme_provider.h" | 5 #include "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" |
| 11 #include "chrome/browser/extensions/extension.h" | 11 #include "chrome/browser/extensions/extension.h" |
| 12 #include "chrome/browser/metrics/user_metrics.h" | 12 #include "chrome/browser/metrics/user_metrics.h" |
| 13 #include "chrome/browser/profile.h" | 13 #include "chrome/browser/profile.h" |
| 14 #include "chrome/browser/theme_resources_util.h" | 14 #include "chrome/browser/theme_resources_util.h" |
| 15 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
| 16 #include "chrome/common/pref_service.h" | 16 #include "chrome/common/pref_service.h" |
| 17 #include "grit/theme_resources.h" | 17 #include "grit/theme_resources.h" |
| 18 #include "net/base/file_stream.h" | 18 #include "net/base/file_stream.h" |
| 19 #include "net/base/net_errors.h" | 19 #include "net/base/net_errors.h" |
| 20 #include "skia/ext/image_operations.h" | 20 #include "skia/ext/image_operations.h" |
| 21 #include "skia/ext/skia_utils.h" | 21 #include "skia/ext/skia_utils.h" |
| 22 #include "SkBitmap.h" | 22 #include "third_party/skia/include/core/SkBitmap.h" |
| 23 | 23 |
| 24 // Strings used by themes to identify colors for different parts of our UI. | 24 // Strings used by themes to identify colors for different parts of our UI. |
| 25 static const std::string kColorFrame = "frame"; | 25 static const std::string kColorFrame = "frame"; |
| 26 static const std::string kColorFrameInactive = "frame_inactive"; | 26 static const std::string kColorFrameInactive = "frame_inactive"; |
| 27 static const std::string kColorFrameIncognito = "frame_incognito"; | 27 static const std::string kColorFrameIncognito = "frame_incognito"; |
| 28 static const std::string kColorFrameIncognitoInactive = | 28 static const std::string kColorFrameIncognitoInactive = |
| 29 "frame_incognito_inactive"; | 29 "frame_incognito_inactive"; |
| 30 static const std::string kColorToolbar = "toolbar"; | 30 static const std::string kColorToolbar = "toolbar"; |
| 31 static const std::string kColorTabText = "tab_text"; | 31 static const std::string kColorTabText = "tab_text"; |
| 32 static const std::string kColorBackgroundTabText = "background_tab_text"; | 32 static const std::string kColorBackgroundTabText = "background_tab_text"; |
| (...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 skia::HSL hsl = (*iter).second; | 522 skia::HSL hsl = (*iter).second; |
| 523 ListValue* hsl_list = new ListValue(); | 523 ListValue* hsl_list = new ListValue(); |
| 524 hsl_list->Set(0, Value::CreateRealValue(hsl.h)); | 524 hsl_list->Set(0, Value::CreateRealValue(hsl.h)); |
| 525 hsl_list->Set(1, Value::CreateRealValue(hsl.s)); | 525 hsl_list->Set(1, Value::CreateRealValue(hsl.s)); |
| 526 hsl_list->Set(2, Value::CreateRealValue(hsl.l)); | 526 hsl_list->Set(2, Value::CreateRealValue(hsl.l)); |
| 527 pref_tints->Set(UTF8ToWide((*iter).first), hsl_list); | 527 pref_tints->Set(UTF8ToWide((*iter).first), hsl_list); |
| 528 ++iter; | 528 ++iter; |
| 529 } | 529 } |
| 530 } | 530 } |
| 531 } | 531 } |
| OLD | NEW |