OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011 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 "ui/base/resource/resource_bundle.h" | |
6 | |
7 #include <windows.h> | |
8 | |
9 #include "base/logging.h" | |
10 #include "base/synchronization/lock.h" | |
11 | |
12 // NOTE(gregoryd): This is a hack to avoid creating more nacl_win64-specific | |
13 // files. The font members of ResourceBundle are never initialized in our code | |
14 // so we can get away with an empty class definition. | |
15 namespace gfx { | |
16 class Font {}; | |
17 } | |
18 | |
19 namespace ui { | |
20 | |
21 ResourceBundle* ResourceBundle::g_shared_instance_ = NULL; | |
22 | |
23 // static | |
24 std::string ResourceBundle::InitSharedInstance( | |
25 const std::string& pref_locale) { | |
26 DCHECK(g_shared_instance_ == NULL) << "ResourceBundle initialized twice"; | |
27 g_shared_instance_ = new ResourceBundle(); | |
28 return std::string(); | |
29 } | |
30 | |
31 // static | |
32 void ResourceBundle::CleanupSharedInstance() { | |
33 if (g_shared_instance_) { | |
34 delete g_shared_instance_; | |
35 g_shared_instance_ = NULL; | |
36 } | |
37 } | |
38 | |
39 // static | |
40 ResourceBundle& ResourceBundle::GetSharedInstance() { | |
41 // Must call InitSharedInstance before this function. | |
42 CHECK(g_shared_instance_ != NULL); | |
43 return *g_shared_instance_; | |
44 } | |
45 | |
46 ResourceBundle::ResourceBundle() | |
47 : lock_(new base::Lock), | |
48 resources_data_(NULL) { | |
49 } | |
50 | |
51 ResourceBundle::~ResourceBundle() { | |
52 } | |
53 | |
54 | |
55 string16 ResourceBundle::GetLocalizedString(int message_id) { | |
56 return string16(); | |
57 } | |
58 | |
59 // static | |
60 void ResourceBundle::SetResourcesDataDLL(HINSTANCE handle) { | |
61 } | |
62 | |
63 } // namespace ui | |
OLD | NEW |