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

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

Issue 672673005: Remove IsHighDPIEnabled, move EnableHighDPISupport to only place it's used (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dpi-cleanup-5
Patch Set: rebase-6 Created 6 years, 2 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
« no previous file with comments | « ui/base/resource/resource_bundle_unittest.cc ('k') | ui/base/test/run_all_unittests.cc » ('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_win.h" 5 #include "ui/base/resource/resource_bundle_win.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 "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "skia/ext/image_operations.h" 10 #include "skia/ext/image_operations.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 void ResourceBundle::LoadCommonResources() { 42 void ResourceBundle::LoadCommonResources() {
43 // As a convenience, add the current resource module as a data packs. 43 // As a convenience, add the current resource module as a data packs.
44 data_packs_.push_back(new ResourceDataDLL(GetCurrentResourceDLL())); 44 data_packs_.push_back(new ResourceDataDLL(GetCurrentResourceDLL()));
45 45
46 if (IsScaleFactorSupported(SCALE_FACTOR_100P)) { 46 if (IsScaleFactorSupported(SCALE_FACTOR_100P)) {
47 AddDataPackFromPath( 47 AddDataPackFromPath(
48 GetResourcesPakFilePath("chrome_100_percent.pak"), 48 GetResourcesPakFilePath("chrome_100_percent.pak"),
49 SCALE_FACTOR_100P); 49 SCALE_FACTOR_100P);
50 } 50 }
51 if (IsScaleFactorSupported(SCALE_FACTOR_200P)) { 51 if (IsScaleFactorSupported(SCALE_FACTOR_200P)) {
52 DCHECK(gfx::IsHighDPIEnabled());
53 AddDataPackFromPath( 52 AddDataPackFromPath(
54 GetResourcesPakFilePath("chrome_200_percent.pak"), 53 GetResourcesPakFilePath("chrome_200_percent.pak"),
55 SCALE_FACTOR_200P); 54 SCALE_FACTOR_200P);
56 } 55 }
57 } 56 }
58 57
59 gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl) { 58 gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl) {
60 // Flipped image is not used on Windows. 59 // Flipped image is not used on Windows.
61 DCHECK_EQ(rtl, RTL_DISABLED); 60 DCHECK_EQ(rtl, RTL_DISABLED);
62 61
63 // Windows only uses SkBitmap for gfx::Image, so this is the same as 62 // Windows only uses SkBitmap for gfx::Image, so this is the same as
64 // GetImageNamed. 63 // GetImageNamed.
65 return GetImageNamed(resource_id); 64 return GetImageNamed(resource_id);
66 } 65 }
67 66
68 void SetResourcesDataDLL(HINSTANCE handle) { 67 void SetResourcesDataDLL(HINSTANCE handle) {
69 resources_data_dll = handle; 68 resources_data_dll = handle;
70 } 69 }
71 70
72 HICON LoadThemeIconFromResourcesDataDLL(int icon_id) { 71 HICON LoadThemeIconFromResourcesDataDLL(int icon_id) {
73 return ::LoadIcon(GetCurrentResourceDLL(), MAKEINTRESOURCE(icon_id)); 72 return ::LoadIcon(GetCurrentResourceDLL(), MAKEINTRESOURCE(icon_id));
74 } 73 }
75 74
76 } // namespace ui; 75 } // namespace ui;
OLDNEW
« no previous file with comments | « ui/base/resource/resource_bundle_unittest.cc ('k') | ui/base/test/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698