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

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

Issue 1889423002: Move Windows DPI Code from ui/gfx to ui/display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a TODO Created 4 years, 8 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"
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/geometry/size_conversions.h" 14 #include "ui/gfx/geometry/size_conversions.h"
15 #include "ui/gfx/image/image_skia.h" 15 #include "ui/gfx/image/image_skia.h"
16 #include "ui/gfx/image/image_skia_source.h" 16 #include "ui/gfx/image/image_skia_source.h"
17 #include "ui/gfx/win/dpi.h"
18 17
19 namespace ui { 18 namespace ui {
20 19
21 namespace { 20 namespace {
22 21
23 HINSTANCE resources_data_dll; 22 HINSTANCE resources_data_dll;
24 23
25 HINSTANCE GetCurrentResourceDLL() { 24 HINSTANCE GetCurrentResourceDLL() {
26 if (resources_data_dll) 25 if (resources_data_dll)
27 return resources_data_dll; 26 return resources_data_dll;
(...skipping 17 matching lines...) Expand all
45 44
46 void SetResourcesDataDLL(HINSTANCE handle) { 45 void SetResourcesDataDLL(HINSTANCE handle) {
47 resources_data_dll = handle; 46 resources_data_dll = handle;
48 } 47 }
49 48
50 HICON LoadThemeIconFromResourcesDataDLL(int icon_id) { 49 HICON LoadThemeIconFromResourcesDataDLL(int icon_id) {
51 return ::LoadIcon(GetCurrentResourceDLL(), MAKEINTRESOURCE(icon_id)); 50 return ::LoadIcon(GetCurrentResourceDLL(), MAKEINTRESOURCE(icon_id));
52 } 51 }
53 52
54 } // namespace ui; 53 } // 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