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

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

Issue 659883002: Enable hidpi on Linux, refactor a bit on Windows to share Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: constants Created 6 years, 1 month 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
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"
11 #include "ui/base/layout.h" 11 #include "ui/base/layout.h"
12 #include "ui/base/resource/resource_bundle.h" 12 #include "ui/base/resource/resource_bundle.h"
13 #include "ui/base/resource/resource_data_dll_win.h" 13 #include "ui/base/resource/resource_data_dll_win.h"
14 #include "ui/gfx/dpi.h"
14 #include "ui/gfx/geometry/size_conversions.h" 15 #include "ui/gfx/geometry/size_conversions.h"
15 #include "ui/gfx/image/image_skia.h" 16 #include "ui/gfx/image/image_skia.h"
16 #include "ui/gfx/image/image_skia_source.h" 17 #include "ui/gfx/image/image_skia_source.h"
17 #include "ui/gfx/win/dpi.h"
18 18
19 namespace ui { 19 namespace ui {
20 20
21 namespace { 21 namespace {
22 22
23 HINSTANCE resources_data_dll; 23 HINSTANCE resources_data_dll;
24 24
25 HINSTANCE GetCurrentResourceDLL() { 25 HINSTANCE GetCurrentResourceDLL() {
26 if (resources_data_dll) 26 if (resources_data_dll)
27 return resources_data_dll; 27 return resources_data_dll;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 void SetResourcesDataDLL(HINSTANCE handle) { 68 void SetResourcesDataDLL(HINSTANCE handle) {
69 resources_data_dll = handle; 69 resources_data_dll = handle;
70 } 70 }
71 71
72 HICON LoadThemeIconFromResourcesDataDLL(int icon_id) { 72 HICON LoadThemeIconFromResourcesDataDLL(int icon_id) {
73 return ::LoadIcon(GetCurrentResourceDLL(), MAKEINTRESOURCE(icon_id)); 73 return ::LoadIcon(GetCurrentResourceDLL(), MAKEINTRESOURCE(icon_id));
74 } 74 }
75 75
76 } // namespace ui; 76 } // namespace ui;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698