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

Side by Side Diff: chrome_frame/simple_resource_loader.cc

Issue 10387010: Select theme resources from ResourceBundle at requested scale factor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with master. Created 8 years, 7 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 "chrome_frame/simple_resource_loader.h" 5 #include "chrome_frame/simple_resource_loader.h"
6 6
7 #include <atlbase.h> 7 #include <atlbase.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 } 199 }
200 200
201 // Attempt to load both the resource pack and the dll. We return success 201 // Attempt to load both the resource pack and the dll. We return success
202 // only we load both. 202 // only we load both.
203 FilePath resource_pack_path = locales_path.Append(*scan + pack_suffix); 203 FilePath resource_pack_path = locales_path.Append(*scan + pack_suffix);
204 FilePath dll_path = locales_path.Append(*scan + dll_suffix); 204 FilePath dll_path = locales_path.Append(*scan + dll_suffix);
205 205
206 if (file_util::PathExists(resource_pack_path) && 206 if (file_util::PathExists(resource_pack_path) &&
207 file_util::PathExists(dll_path)) { 207 file_util::PathExists(dll_path)) {
208 scoped_ptr<ui::DataPack> cur_data_pack( 208 scoped_ptr<ui::DataPack> cur_data_pack(
209 new ui::DataPack(ui::ResourceHandle::kScaleFactor100x)); 209 new ui::DataPack(ui::SCALE_FACTOR_100P));
210 if (!cur_data_pack->Load(resource_pack_path)) 210 if (!cur_data_pack->Load(resource_pack_path))
211 continue; 211 continue;
212 212
213 HMODULE locale_dll_handle = LoadLibraryEx(dll_path.value().c_str(), NULL, 213 HMODULE locale_dll_handle = LoadLibraryEx(dll_path.value().c_str(), NULL,
214 load_flags); 214 load_flags);
215 if (locale_dll_handle) { 215 if (locale_dll_handle) {
216 *dll_handle = locale_dll_handle; 216 *dll_handle = locale_dll_handle;
217 *language = dll_path.BaseName().RemoveExtension().value(); 217 *language = dll_path.BaseName().RemoveExtension().value();
218 *data_pack = cur_data_pack.release(); 218 *data_pack = cur_data_pack.release();
219 found_pack = true; 219 found_pack = true;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 260
261 // static 261 // static
262 std::wstring SimpleResourceLoader::Get(int message_id) { 262 std::wstring SimpleResourceLoader::Get(int message_id) {
263 SimpleResourceLoader* loader = SimpleResourceLoader::GetInstance(); 263 SimpleResourceLoader* loader = SimpleResourceLoader::GetInstance();
264 return loader->GetLocalizedResource(message_id); 264 return loader->GetLocalizedResource(message_id);
265 } 265 }
266 266
267 HMODULE SimpleResourceLoader::GetResourceModuleHandle() { 267 HMODULE SimpleResourceLoader::GetResourceModuleHandle() {
268 return locale_dll_handle_; 268 return locale_dll_handle_;
269 } 269 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698