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.
5 #include "app/resource_bundle.h"
9 #include "base/logging.h"
10 #include "base/win_util.h"
13 ResourceBundle
* ResourceBundle::g_shared_instance_
= NULL
;
15 // NOTE(gregoryd): This is a hack to avoid creating more nacl_win64-specific
16 // files. The font members of ResourceBundle are never initialized in our code
17 // so this destructor is never called.
19 Font::HFontRef::~HFontRef() {
26 std::string
ResourceBundle::InitSharedInstance(
27 const std::wstring
& pref_locale
) {
28 DCHECK(g_shared_instance_
== NULL
) << "ResourceBundle initialized twice";
29 g_shared_instance_
= new ResourceBundle();
34 void ResourceBundle::CleanupSharedInstance() {
35 if (g_shared_instance_
) {
36 delete g_shared_instance_
;
37 g_shared_instance_
= NULL
;
42 ResourceBundle
& ResourceBundle::GetSharedInstance() {
43 // Must call InitSharedInstance before this function.
44 CHECK(g_shared_instance_
!= NULL
);
45 return *g_shared_instance_
;
48 ResourceBundle::ResourceBundle()
49 : resources_data_(NULL
),
50 locale_resources_data_(NULL
) {
53 ResourceBundle::~ResourceBundle() {
57 string16
ResourceBundle::GetLocalizedString(int message_id
) {
58 return std::wstring();