Chromium Code Reviews| 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/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/stl_util-inl.h" | 8 #include "base/stl_util-inl.h" |
| 9 #include "base/string_piece.h" | 9 #include "base/string_piece.h" |
| 10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
| 11 #include "build/build_config.h" | 11 #include "build/build_config.h" |
| 12 #include "third_party/skia/include/core/SkBitmap.h" | 12 #include "third_party/skia/include/core/SkBitmap.h" |
| 13 #include "ui/base/resource/data_pack.h" | 13 #include "ui/base/resource/data_pack.h" |
| 14 #include "ui/gfx/codec/png_codec.h" | 14 #include "ui/gfx/codec/png_codec.h" |
| 15 #include "ui/gfx/font.h" | 15 #include "ui/gfx/font.h" |
| 16 #include "ui/gfx/image.h" | 16 #include "ui/gfx/image.h" |
| 17 | 17 |
| 18 namespace ui { | 18 namespace ui { |
| 19 | 19 |
| 20 const std::string kLocaleResourcePathSwitch = "locale_res_path"; | |
|
jeremy
2011/05/19 16:08:46
Need a comment block describing what this does and
ofri
2011/05/23 08:42:50
Well, since it only overrides the locale resources
| |
| 21 | |
| 20 namespace { | 22 namespace { |
| 21 | 23 |
| 22 // Font sizes relative to base font. | 24 // Font sizes relative to base font. |
| 23 #if defined(OS_CHROMEOS) && defined(CROS_FONTS_USING_BCI) | 25 #if defined(OS_CHROMEOS) && defined(CROS_FONTS_USING_BCI) |
| 24 const int kSmallFontSizeDelta = -3; | 26 const int kSmallFontSizeDelta = -3; |
| 25 const int kMediumFontSizeDelta = 2; | 27 const int kMediumFontSizeDelta = 2; |
| 26 const int kLargeFontSizeDelta = 7; | 28 const int kLargeFontSizeDelta = 7; |
| 27 #else | 29 #else |
| 28 const int kSmallFontSizeDelta = -2; | 30 const int kSmallFontSizeDelta = -2; |
| 29 const int kMediumFontSizeDelta = 3; | 31 const int kMediumFontSizeDelta = 3; |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 287 } | 289 } |
| 288 | 290 |
| 289 RefCountedStaticMemory* ResourceBundle::LoadedDataPack::GetStaticMemory( | 291 RefCountedStaticMemory* ResourceBundle::LoadedDataPack::GetStaticMemory( |
| 290 int resource_id) const { | 292 int resource_id) const { |
| 291 if (!data_pack_.get()) | 293 if (!data_pack_.get()) |
| 292 return NULL; | 294 return NULL; |
| 293 return data_pack_->GetStaticMemory(resource_id); | 295 return data_pack_->GetStaticMemory(resource_id); |
| 294 } | 296 } |
| 295 | 297 |
| 296 } // namespace ui | 298 } // namespace ui |
| OLD | NEW |