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/logging.h" | 7 #include "base/logging.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "ui/base/layout.h" | 9 #include "ui/base/layout.h" |
10 #include "ui/base/resource/resource_handle.h" | 10 #include "ui/base/resource/resource_handle.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 // Return just the name of the pack file. | 21 // Return just the name of the pack file. |
22 return FilePath(pak_name.c_str()); | 22 return FilePath(pak_name.c_str()); |
23 } | 23 } |
24 | 24 |
25 } // namespace | 25 } // namespace |
26 | 26 |
27 namespace ui { | 27 namespace ui { |
28 | 28 |
29 void ResourceBundle::LoadCommonResources() { | 29 void ResourceBundle::LoadCommonResources() { |
30 AddDataPack(GetResourcesPakFilePath("chrome.pak"), | 30 AddDataPack(GetResourcesPakFilePath("chrome.pak"), |
31 ResourceHandle::kScaleFactor100x); | 31 SCALE_FACTOR_100P); |
32 | 32 |
33 if (ui::GetDisplayLayout() == ui::LAYOUT_TOUCH) { | 33 if (ui::GetDisplayLayout() == ui::LAYOUT_TOUCH) { |
34 AddDataPack(GetResourcesPakFilePath("theme_resources_touch_1x.pak"), | 34 AddDataPack(GetResourcesPakFilePath("theme_resources_touch_1x.pak"), |
35 ResourceHandle::kScaleFactor100x); | 35 SCALE_FACTOR_100P); |
36 AddDataPack(GetResourcesPakFilePath("ui_resources_touch.pak"), | 36 AddDataPack(GetResourcesPakFilePath("ui_resources_touch.pak"), |
37 ResourceHandle::kScaleFactor100x); | 37 SCALE_FACTOR_100P); |
38 } else { | 38 } else { |
39 AddDataPack(GetResourcesPakFilePath("theme_resources_standard.pak"), | 39 AddDataPack(GetResourcesPakFilePath("theme_resources_standard.pak"), |
40 ResourceHandle::kScaleFactor100x); | 40 SCALE_FACTOR_100P); |
41 AddDataPack(GetResourcesPakFilePath("ui_resources_standard.pak"), | 41 AddDataPack(GetResourcesPakFilePath("ui_resources_standard.pak"), |
42 ResourceHandle::kScaleFactor100x); | 42 SCALE_FACTOR_100P); |
43 } | 43 } |
44 } | 44 } |
45 | 45 |
46 gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl) { | 46 gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl) { |
47 // Flipped image is not used on ChromeOS. | 47 // Flipped image is not used on ChromeOS. |
48 DCHECK_EQ(rtl, RTL_DISABLED); | 48 DCHECK_EQ(rtl, RTL_DISABLED); |
49 return GetImageNamed(resource_id); | 49 return GetImageNamed(resource_id); |
50 } | 50 } |
51 | 51 |
52 } // namespace ui | 52 } // namespace ui |
OLD | NEW |