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 "gfx/codec/png_codec.h" | |
13 #include "gfx/font.h" | |
14 #include "third_party/skia/include/core/SkBitmap.h" | 12 #include "third_party/skia/include/core/SkBitmap.h" |
15 #include "ui/base/resource/data_pack.h" | 13 #include "ui/base/resource/data_pack.h" |
| 14 #include "ui/gfx/codec/png_codec.h" |
| 15 #include "ui/gfx/font.h" |
16 | 16 |
17 namespace ui { | 17 namespace ui { |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 // Font sizes relative to base font. | 21 // Font sizes relative to base font. |
22 #if defined(OS_CHROMEOS) && defined(CROS_FONTS_USING_BCI) | 22 #if defined(OS_CHROMEOS) && defined(CROS_FONTS_USING_BCI) |
23 const int kSmallFontSizeDelta = -3; | 23 const int kSmallFontSizeDelta = -3; |
24 const int kMediumFontSizeDelta = 2; | 24 const int kMediumFontSizeDelta = 2; |
25 const int kLargeFontSizeDelta = 7; | 25 const int kLargeFontSizeDelta = 7; |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 int resource_id, base::StringPiece* data) const { | 260 int resource_id, base::StringPiece* data) const { |
261 return data_pack_->GetStringPiece(static_cast<uint32>(resource_id), data); | 261 return data_pack_->GetStringPiece(static_cast<uint32>(resource_id), data); |
262 } | 262 } |
263 | 263 |
264 RefCountedStaticMemory* ResourceBundle::LoadedDataPack::GetStaticMemory( | 264 RefCountedStaticMemory* ResourceBundle::LoadedDataPack::GetStaticMemory( |
265 int resource_id) const { | 265 int resource_id) const { |
266 return data_pack_->GetStaticMemory(resource_id); | 266 return data_pack_->GetStaticMemory(resource_id); |
267 } | 267 } |
268 | 268 |
269 } // namespace ui | 269 } // namespace ui |
OLD | NEW |