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

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

Issue 10808072: ui: No need to typedef testing::Test in unittests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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
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/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "ui/base/layout.h" 10 #include "ui/base/layout.h"
(...skipping 15 matching lines...) Expand all
26 26
27 FilePath GetResourcesPakFilePath(const std::string& pak_name) { 27 FilePath GetResourcesPakFilePath(const std::string& pak_name) {
28 FilePath path; 28 FilePath path;
29 if (PathService::Get(base::DIR_MODULE, &path)) 29 if (PathService::Get(base::DIR_MODULE, &path))
30 return path.AppendASCII(pak_name.c_str()); 30 return path.AppendASCII(pak_name.c_str());
31 31
32 // Return just the name of the pack file. 32 // Return just the name of the pack file.
33 return FilePath(ASCIIToUTF16(pak_name)); 33 return FilePath(ASCIIToUTF16(pak_name));
34 } 34 }
35 35
36 } // end anonymous namespace 36 } // namespace
37 37
38 void ResourceBundle::LoadCommonResources() { 38 void ResourceBundle::LoadCommonResources() {
39 // As a convenience, add the current resource module as a data packs. 39 // As a convenience, add the current resource module as a data packs.
40 data_packs_.push_back(new ResourceDataDLL(GetCurrentResourceDLL())); 40 data_packs_.push_back(new ResourceDataDLL(GetCurrentResourceDLL()));
41 41
42 bool use_hidpi = false; 42 bool use_hidpi = false;
43 #if defined(ENABLE_HIDPI) 43 #if defined(ENABLE_HIDPI)
44 // If we're running in HiDPI mode at a scale larger than 150%, we switch 44 // If we're running in HiDPI mode at a scale larger than 150%, we switch
45 // to 2x resources for desktop layouts. 45 // to 2x resources for desktop layouts.
46 use_hidpi = ui::GetDPIScale() > 1.5; 46 use_hidpi = ui::GetDPIScale() > 1.5;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 void SetResourcesDataDLL(HINSTANCE handle) { 85 void SetResourcesDataDLL(HINSTANCE handle) {
86 resources_data_dll = handle; 86 resources_data_dll = handle;
87 } 87 }
88 88
89 HICON LoadThemeIconFromResourcesDataDLL(int icon_id) { 89 HICON LoadThemeIconFromResourcesDataDLL(int icon_id) {
90 return ::LoadIcon(GetCurrentResourceDLL(), MAKEINTRESOURCE(icon_id)); 90 return ::LoadIcon(GetCurrentResourceDLL(), MAKEINTRESOURCE(icon_id));
91 } 91 }
92 92
93 } // namespace ui; 93 } // namespace ui;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698