| 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/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "ui/base/layout.h" | 10 #include "ui/base/layout.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 } // namespace | 28 } // namespace |
| 29 | 29 |
| 30 namespace ui { | 30 namespace ui { |
| 31 | 31 |
| 32 void ResourceBundle::LoadCommonResources() { | 32 void ResourceBundle::LoadCommonResources() { |
| 33 // Always load the 1x data pack first as the 2x data pack contains both 1x and | 33 // Always load the 1x data pack first as the 2x data pack contains both 1x and |
| 34 // 2x images. The 1x data pack only has 1x images, thus passes in an accurate | 34 // 2x images. The 1x data pack only has 1x images, thus passes in an accurate |
| 35 // scale factor to gfx::ImageSkia::AddRepresentation. | 35 // scale factor to gfx::ImageSkia::AddRepresentation. |
| 36 | 36 |
| 37 AddDataPackFromPath(GetResourcesPakFilePath("chrome.pak"), | 37 AddDataPackFromPath(GetResourcesPakFilePath("chrome.pak"), |
| 38 SCALE_FACTOR_100P); | 38 SCALE_FACTOR_NONE); |
| 39 AddDataPackFromPath(GetResourcesPakFilePath( | 39 AddDataPackFromPath(GetResourcesPakFilePath( |
| 40 "chrome_100_percent.pak"), | 40 "chrome_100_percent.pak"), |
| 41 SCALE_FACTOR_100P); | 41 SCALE_FACTOR_100P); |
| 42 AddOptionalDataPackFromPath(GetResourcesPakFilePath( | 42 AddOptionalDataPackFromPath(GetResourcesPakFilePath( |
| 43 "chrome_200_percent.pak"), | 43 "chrome_200_percent.pak"), |
| 44 SCALE_FACTOR_200P); | 44 SCALE_FACTOR_200P); |
| 45 } | 45 } |
| 46 | 46 |
| 47 gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl) { | 47 gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl) { |
| 48 // Flipped image is not used on ChromeOS. | 48 // Flipped image is not used on ChromeOS. |
| 49 DCHECK_EQ(rtl, RTL_DISABLED); | 49 DCHECK_EQ(rtl, RTL_DISABLED); |
| 50 return GetImageNamed(resource_id); | 50 return GetImageNamed(resource_id); |
| 51 } | 51 } |
| 52 | 52 |
| 53 } // namespace ui | 53 } // namespace ui |
| OLD | NEW |