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 "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 26 matching lines...) Expand all Loading... |
37 const int kSmallFontSizeDelta = -2; | 37 const int kSmallFontSizeDelta = -2; |
38 const int kMediumFontSizeDelta = 3; | 38 const int kMediumFontSizeDelta = 3; |
39 const int kLargeFontSizeDelta = 8; | 39 const int kLargeFontSizeDelta = 8; |
40 #endif | 40 #endif |
41 | 41 |
42 } // namespace | 42 } // namespace |
43 | 43 |
44 ResourceBundle* ResourceBundle::g_shared_instance_ = NULL; | 44 ResourceBundle* ResourceBundle::g_shared_instance_ = NULL; |
45 | 45 |
46 // static | 46 // static |
47 const SkColor ResourceBundle::toolbar_color = | |
48 SkColorSetRGB(210, 225, 246); | |
49 | |
50 // static | |
51 std::string ResourceBundle::InitSharedInstanceWithLocale( | 47 std::string ResourceBundle::InitSharedInstanceWithLocale( |
52 const std::string& pref_locale) { | 48 const std::string& pref_locale) { |
53 DCHECK(g_shared_instance_ == NULL) << "ResourceBundle initialized twice"; | 49 DCHECK(g_shared_instance_ == NULL) << "ResourceBundle initialized twice"; |
54 g_shared_instance_ = new ResourceBundle(); | 50 g_shared_instance_ = new ResourceBundle(); |
55 | 51 |
56 g_shared_instance_->LoadCommonResources(); | 52 g_shared_instance_->LoadCommonResources(); |
57 return g_shared_instance_->LoadLocaleResources(pref_locale); | 53 return g_shared_instance_->LoadLocaleResources(pref_locale); |
58 } | 54 } |
59 | 55 |
60 // static | 56 // static |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 } | 404 } |
409 | 405 |
410 RefCountedStaticMemory* ResourceBundle::LoadedDataPack::GetStaticMemory( | 406 RefCountedStaticMemory* ResourceBundle::LoadedDataPack::GetStaticMemory( |
411 int resource_id) const { | 407 int resource_id) const { |
412 if (!data_pack_.get()) | 408 if (!data_pack_.get()) |
413 return NULL; | 409 return NULL; |
414 return data_pack_->GetStaticMemory(resource_id); | 410 return data_pack_->GetStaticMemory(resource_id); |
415 } | 411 } |
416 | 412 |
417 } // namespace ui | 413 } // namespace ui |
OLD | NEW |