OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 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 | 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 "app/resource_bundle.h" | 5 #include "ui/base/resource/resource_bundle.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 | 8 |
9 #include "base/lock.h" | 9 #include "base/lock.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "gfx/font.h" | 11 #include "gfx/font.h" |
12 #include "gfx/platform_font_win.h" | 12 #include "gfx/platform_font_win.h" |
13 | 13 |
14 ResourceBundle* ResourceBundle::g_shared_instance_ = NULL; | |
15 | |
16 // NOTE(gregoryd): This is a hack to avoid creating more nacl_win64-specific | 14 // 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 | 15 // files. The font members of ResourceBundle are never initialized in our code |
18 // so this destructor is never called. | 16 // so this destructor is never called. |
19 namespace gfx { | 17 namespace gfx { |
20 Font::~Font() { | 18 Font::~Font() { |
21 NOTREACHED(); | 19 NOTREACHED(); |
22 } | 20 } |
23 PlatformFontWin::HFontRef::~HFontRef() { | 21 PlatformFontWin::HFontRef::~HFontRef() { |
24 NOTREACHED(); | 22 NOTREACHED(); |
25 } | 23 } |
26 } | 24 } |
27 | 25 |
| 26 namespace ui { |
| 27 |
| 28 ResourceBundle* ResourceBundle::g_shared_instance_ = NULL; |
28 | 29 |
29 /* static */ | 30 /* static */ |
30 std::string ResourceBundle::InitSharedInstance( | 31 std::string ResourceBundle::InitSharedInstance( |
31 const std::string& pref_locale) { | 32 const std::string& pref_locale) { |
32 DCHECK(g_shared_instance_ == NULL) << "ResourceBundle initialized twice"; | 33 DCHECK(g_shared_instance_ == NULL) << "ResourceBundle initialized twice"; |
33 g_shared_instance_ = new ResourceBundle(); | 34 g_shared_instance_ = new ResourceBundle(); |
34 return std::string(); | 35 return std::string(); |
35 } | 36 } |
36 | 37 |
37 /* static */ | 38 /* static */ |
(...skipping 17 matching lines...) Expand all Loading... |
55 locale_resources_data_(NULL) { | 56 locale_resources_data_(NULL) { |
56 } | 57 } |
57 | 58 |
58 ResourceBundle::~ResourceBundle() { | 59 ResourceBundle::~ResourceBundle() { |
59 } | 60 } |
60 | 61 |
61 | 62 |
62 string16 ResourceBundle::GetLocalizedString(int message_id) { | 63 string16 ResourceBundle::GetLocalizedString(int message_id) { |
63 return string16(); | 64 return string16(); |
64 } | 65 } |
| 66 |
| 67 } // namespace ui |
OLD | NEW |