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

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

Issue 10270023: Add new ResourceBundle::Delegate interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
« no previous file with comments | « ui/base/resource/resource_bundle_android.cc ('k') | ui/base/resource/resource_bundle_gtk.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.h" 5 #include "ui/base/resource/resource_bundle.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 "ui/base/layout.h" 9 #include "ui/base/layout.h"
10 #include "ui/base/resource/resource_handle.h" 10 #include "ui/base/resource/resource_handle.h"
11 #include "ui/base/ui_base_paths.h" 11 #include "ui/base/ui_base_paths.h"
12 #include "ui/gfx/image/image.h" 12 #include "ui/gfx/image/image.h"
13 13
14 namespace { 14 namespace {
15 15
16 FilePath GetResourcesPakFilePath(const std::string& pak_name) { 16 FilePath GetResourcesPakFilePath(const std::string& pak_name) {
17 FilePath path; 17 FilePath path;
18 if (PathService::Get(base::DIR_MODULE, &path)) 18 if (PathService::Get(base::DIR_MODULE, &path))
19 return path.AppendASCII(pak_name.c_str()); 19 return path.AppendASCII(pak_name.c_str());
20 return FilePath(); 20
21 // Return just the name of the pack file.
22 return FilePath(pak_name.c_str());
21 } 23 }
22 24
23 } // namespace 25 } // namespace
24 26
25 namespace ui { 27 namespace ui {
26 28
27 void ResourceBundle::LoadCommonResources() { 29 void ResourceBundle::LoadCommonResources() {
28 AddDataPack(GetResourcesPakFilePath("chrome.pak"), 30 AddDataPack(GetResourcesPakFilePath("chrome.pak"),
29 ResourceHandle::kScaleFactor100x); 31 ResourceHandle::kScaleFactor100x);
30 32
(...skipping 10 matching lines...) Expand all
41 } 43 }
42 } 44 }
43 45
44 gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl) { 46 gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl) {
45 // Flipped image is not used on ChromeOS. 47 // Flipped image is not used on ChromeOS.
46 DCHECK_EQ(rtl, RTL_DISABLED); 48 DCHECK_EQ(rtl, RTL_DISABLED);
47 return GetImageNamed(resource_id); 49 return GetImageNamed(resource_id);
48 } 50 }
49 51
50 } // namespace ui 52 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/resource/resource_bundle_android.cc ('k') | ui/base/resource/resource_bundle_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698