OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ui/base/resource/resource_bundle.h" | 5 #include "ui/base/resource/resource_bundle.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 const int kSmallFontSizeDelta = -2; | 36 const int kSmallFontSizeDelta = -2; |
37 const int kMediumFontSizeDelta = 3; | 37 const int kMediumFontSizeDelta = 3; |
38 const int kLargeFontSizeDelta = 8; | 38 const int kLargeFontSizeDelta = 8; |
39 #endif | 39 #endif |
40 | 40 |
41 } // namespace | 41 } // namespace |
42 | 42 |
43 ResourceBundle* ResourceBundle::g_shared_instance_ = NULL; | 43 ResourceBundle* ResourceBundle::g_shared_instance_ = NULL; |
44 | 44 |
45 // static | 45 // static |
46 // TODO(glen): Finish moving these into theme provider (dialogs still | |
47 // depend on these colors). | |
48 #if defined(USE_AURA) | |
49 const SkColor ResourceBundle::frame_color = | |
50 SkColorSetRGB(109, 109, 109); | |
51 const SkColor ResourceBundle::frame_color_inactive = | |
52 SkColorSetRGB(176, 176, 176); | |
53 #else | |
54 const SkColor ResourceBundle::frame_color = | |
55 SkColorSetRGB(66, 116, 201); | |
56 const SkColor ResourceBundle::frame_color_inactive = | |
57 SkColorSetRGB(161, 182, 228); | |
58 #endif | |
59 const SkColor ResourceBundle::toolbar_color = | 46 const SkColor ResourceBundle::toolbar_color = |
60 SkColorSetRGB(210, 225, 246); | 47 SkColorSetRGB(210, 225, 246); |
61 const SkColor ResourceBundle::toolbar_separator_color = | 48 const SkColor ResourceBundle::toolbar_separator_color = |
62 SkColorSetRGB(182, 186, 192); | 49 SkColorSetRGB(182, 186, 192); |
63 | 50 |
64 // static | 51 // static |
65 std::string ResourceBundle::InitSharedInstance( | 52 std::string ResourceBundle::InitSharedInstance( |
66 const std::string& pref_locale) { | 53 const std::string& pref_locale) { |
67 DCHECK(g_shared_instance_ == NULL) << "ResourceBundle initialized twice"; | 54 DCHECK(g_shared_instance_ == NULL) << "ResourceBundle initialized twice"; |
68 g_shared_instance_ = new ResourceBundle(); | 55 g_shared_instance_ = new ResourceBundle(); |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 } | 401 } |
415 | 402 |
416 RefCountedStaticMemory* ResourceBundle::LoadedDataPack::GetStaticMemory( | 403 RefCountedStaticMemory* ResourceBundle::LoadedDataPack::GetStaticMemory( |
417 int resource_id) const { | 404 int resource_id) const { |
418 if (!data_pack_.get()) | 405 if (!data_pack_.get()) |
419 return NULL; | 406 return NULL; |
420 return data_pack_->GetStaticMemory(resource_id); | 407 return data_pack_->GetStaticMemory(resource_id); |
421 } | 408 } |
422 | 409 |
423 } // namespace ui | 410 } // namespace ui |
OLD | NEW |