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

Side by Side Diff: app/resource_bundle_dummy.cc

Issue 6263008: Move ResourceBundle, DataPack to ui/base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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 | « app/resource_bundle.cc ('k') | app/resource_bundle_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "app/resource_bundle.h"
6
7 #include <windows.h>
8
9 #include "base/lock.h"
10 #include "base/logging.h"
11 #include "gfx/font.h"
12 #include "gfx/platform_font_win.h"
13
14 ResourceBundle* ResourceBundle::g_shared_instance_ = NULL;
15
16 // NOTE(gregoryd): This is a hack to avoid creating more nacl_win64-specific
17 // files. The font members of ResourceBundle are never initialized in our code
18 // so this destructor is never called.
19 namespace gfx {
20 Font::~Font() {
21 NOTREACHED();
22 }
23 PlatformFontWin::HFontRef::~HFontRef() {
24 NOTREACHED();
25 }
26 }
27
28
29 /* static */
30 std::string ResourceBundle::InitSharedInstance(
31 const std::string& pref_locale) {
32 DCHECK(g_shared_instance_ == NULL) << "ResourceBundle initialized twice";
33 g_shared_instance_ = new ResourceBundle();
34 return std::string();
35 }
36
37 /* static */
38 void ResourceBundle::CleanupSharedInstance() {
39 if (g_shared_instance_) {
40 delete g_shared_instance_;
41 g_shared_instance_ = NULL;
42 }
43 }
44
45 /* static */
46 ResourceBundle& ResourceBundle::GetSharedInstance() {
47 // Must call InitSharedInstance before this function.
48 CHECK(g_shared_instance_ != NULL);
49 return *g_shared_instance_;
50 }
51
52 ResourceBundle::ResourceBundle()
53 : lock_(new Lock),
54 resources_data_(NULL),
55 locale_resources_data_(NULL) {
56 }
57
58 ResourceBundle::~ResourceBundle() {
59 }
60
61
62 string16 ResourceBundle::GetLocalizedString(int message_id) {
63 return string16();
64 }
OLDNEW
« no previous file with comments | « app/resource_bundle.cc ('k') | app/resource_bundle_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698