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

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

Issue 12286020: Replace FilePath with base::FilePath. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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"
11 #include "ui/base/resource/resource_bundle.h" 11 #include "ui/base/resource/resource_bundle.h"
12 #include "ui/base/resource/resource_data_dll_win.h" 12 #include "ui/base/resource/resource_data_dll_win.h"
13 #include "ui/base/win/dpi.h" 13 #include "ui/base/win/dpi.h"
14 14
15 namespace ui { 15 namespace ui {
16 16
17 namespace { 17 namespace {
18 18
19 HINSTANCE resources_data_dll; 19 HINSTANCE resources_data_dll;
20 20
21 HINSTANCE GetCurrentResourceDLL() { 21 HINSTANCE GetCurrentResourceDLL() {
22 if (resources_data_dll) 22 if (resources_data_dll)
23 return resources_data_dll; 23 return resources_data_dll;
24 return GetModuleHandle(NULL); 24 return GetModuleHandle(NULL);
25 } 25 }
26 26
27 FilePath GetResourcesPakFilePath(const std::string& pak_name) { 27 base::FilePath GetResourcesPakFilePath(const std::string& pak_name) {
28 base::FilePath path; 28 base::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 base::FilePath(ASCIIToUTF16(pak_name)); 33 return base::FilePath(ASCIIToUTF16(pak_name));
34 } 34 }
35 35
36 } // namespace 36 } // namespace
37 37
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 void SetResourcesDataDLL(HINSTANCE handle) { 81 void SetResourcesDataDLL(HINSTANCE handle) {
82 resources_data_dll = handle; 82 resources_data_dll = handle;
83 } 83 }
84 84
85 HICON LoadThemeIconFromResourcesDataDLL(int icon_id) { 85 HICON LoadThemeIconFromResourcesDataDLL(int icon_id) {
86 return ::LoadIcon(GetCurrentResourceDLL(), MAKEINTRESOURCE(icon_id)); 86 return ::LoadIcon(GetCurrentResourceDLL(), MAKEINTRESOURCE(icon_id));
87 } 87 }
88 88
89 } // namespace ui; 89 } // namespace ui;
OLDNEW
« no previous file with comments | « ui/base/resource/resource_bundle_mac.mm ('k') | ui/shell_dialogs/gtk/select_file_dialog_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698