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

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

Issue 10701105: Update webkit_resources to support high-dpi assets (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change resource_bundle_mac.mm to load webkit_resources* on Mac as for other platforms Created 8 years, 4 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 | « tools/gritsettings/resource_ids ('k') | ui/base/resource/resource_bundle_mac.mm » ('j') | 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 if (ui::GetDisplayLayout() == ui::LAYOUT_TOUCH) { 45 if (ui::GetDisplayLayout() == ui::LAYOUT_TOUCH) {
46 // 1x touch 46 // 1x touch
47 AddDataPackFromPath(GetResourcesPakFilePath( 47 AddDataPackFromPath(GetResourcesPakFilePath(
48 "theme_resources_touch_100_percent.pak"), 48 "theme_resources_touch_100_percent.pak"),
49 SCALE_FACTOR_100P); 49 SCALE_FACTOR_100P);
50 AddDataPackFromPath(GetResourcesPakFilePath( 50 AddDataPackFromPath(GetResourcesPakFilePath(
51 "ui_resources_touch_100_percent.pak"), 51 "ui_resources_touch_100_percent.pak"),
52 SCALE_FACTOR_100P); 52 SCALE_FACTOR_100P);
53 if (ShouldLoad2xResources()) { 53 if (ShouldLoad2xResources()) {
54 // 2x touch 54 // 2x touch
55 AddDataPackFromPath( 55 AddDataPackFromPath(GetResourcesPakFilePath(
56 GetResourcesPakFilePath("theme_resources_touch_200_percent.pak"), 56 "theme_resources_touch_200_percent.pak"),
57 SCALE_FACTOR_200P); 57 SCALE_FACTOR_200P);
58 AddDataPackFromPath(GetResourcesPakFilePath( 58 AddDataPackFromPath(GetResourcesPakFilePath(
59 "ui_resources_touch_200_percent.pak"), 59 "ui_resources_touch_200_percent.pak"),
60 SCALE_FACTOR_200P); 60 SCALE_FACTOR_200P);
61 AddDataPackFromPath(GetResourcesPakFilePath(
62 "webkit_resources_200_percent.pak"),
63 SCALE_FACTOR_200P);
61 } 64 }
62 } else { 65 } else {
63 // 1x non touch 66 // 1x non touch
64 AddDataPackFromPath(GetResourcesPakFilePath( 67 AddDataPackFromPath(GetResourcesPakFilePath(
65 "theme_resources_100_percent.pak"), 68 "theme_resources_100_percent.pak"),
66 SCALE_FACTOR_100P); 69 SCALE_FACTOR_100P);
67 AddDataPackFromPath(GetResourcesPakFilePath( 70 AddDataPackFromPath(GetResourcesPakFilePath(
68 "ui_resources_100_percent.pak"), 71 "ui_resources_100_percent.pak"),
69 SCALE_FACTOR_100P); 72 SCALE_FACTOR_100P);
70 if (ShouldLoad2xResources()) { 73 if (ShouldLoad2xResources()) {
71 // 2x non touch 74 // 2x non touch
72 AddDataPackFromPath(GetResourcesPakFilePath( 75 AddDataPackFromPath(GetResourcesPakFilePath(
73 "theme_resources_200_percent.pak"), 76 "theme_resources_200_percent.pak"),
74 SCALE_FACTOR_200P); 77 SCALE_FACTOR_200P);
75 AddDataPackFromPath(GetResourcesPakFilePath( 78 AddDataPackFromPath(GetResourcesPakFilePath(
76 "ui_resources_200_percent.pak"), 79 "ui_resources_200_percent.pak"),
77 SCALE_FACTOR_200P); 80 SCALE_FACTOR_200P);
81 AddDataPackFromPath(GetResourcesPakFilePath(
82 "webkit_resources_200_percent.pak"),
83 SCALE_FACTOR_200P);
78 } 84 }
79 } 85 }
80 } 86 }
81 87
82 gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl) { 88 gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl) {
83 // Flipped image is not used on ChromeOS. 89 // Flipped image is not used on ChromeOS.
84 DCHECK_EQ(rtl, RTL_DISABLED); 90 DCHECK_EQ(rtl, RTL_DISABLED);
85 return GetImageNamed(resource_id); 91 return GetImageNamed(resource_id);
86 } 92 }
87 93
88 } // namespace ui 94 } // namespace ui
OLDNEW
« no previous file with comments | « tools/gritsettings/resource_ids ('k') | ui/base/resource/resource_bundle_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698