Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(413)

Side by Side Diff: ui/base/resource/resource_bundle_auralinux.cc

Issue 291073002: Move IsScaleFactorSupported, FindClosestScaleFactorUnsafe to ui/base/resource_bundle.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/base/resource/resource_bundle.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 18 matching lines...) Expand all
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 AddDataPackFromPath(GetResourcesPakFilePath( 36 AddDataPackFromPath(GetResourcesPakFilePath(
37 "chrome_100_percent.pak"), SCALE_FACTOR_100P); 37 "chrome_100_percent.pak"), SCALE_FACTOR_100P);
38 38
39 if (ui::IsScaleFactorSupported(SCALE_FACTOR_200P)) { 39 if (IsScaleFactorSupported(SCALE_FACTOR_200P)) {
40 AddOptionalDataPackFromPath(GetResourcesPakFilePath( 40 AddOptionalDataPackFromPath(GetResourcesPakFilePath(
41 "chrome_200_percent.pak"), SCALE_FACTOR_200P); 41 "chrome_200_percent.pak"), SCALE_FACTOR_200P);
42 } 42 }
43 } 43 }
44 44
45 gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl) { 45 gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl) {
46 // Flipped image is not used on ChromeOS. 46 // Flipped image is not used on ChromeOS.
47 DCHECK_EQ(rtl, RTL_DISABLED); 47 DCHECK_EQ(rtl, RTL_DISABLED);
48 return GetImageNamed(resource_id); 48 return GetImageNamed(resource_id);
49 } 49 }
50 50
51 } // namespace ui 51 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/resource/resource_bundle.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698