OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #ifndef CHROME_COMMON_RESOURCE_BUNDLE_H__ | 5 #ifndef CHROME_COMMON_RESOURCE_BUNDLE_H__ |
6 #define CHROME_COMMON_RESOURCE_BUNDLE_H__ | 6 #define CHROME_COMMON_RESOURCE_BUNDLE_H__ |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 | 9 |
10 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 | 112 |
113 private: | 113 private: |
114 // We define a DataHandle typedef to abstract across how data is stored | 114 // We define a DataHandle typedef to abstract across how data is stored |
115 // across platforms. | 115 // across platforms. |
116 #if defined(OS_WIN) | 116 #if defined(OS_WIN) |
117 // Windows stores resources in DLLs, which are managed by HINSTANCE. | 117 // Windows stores resources in DLLs, which are managed by HINSTANCE. |
118 typedef HINSTANCE DataHandle; | 118 typedef HINSTANCE DataHandle; |
119 #elif defined(OS_LINUX) | 119 #elif defined(OS_LINUX) |
120 // Linux will use base::DataPack. TODO(evanm): finish this. | 120 // Linux will use base::DataPack. TODO(evanm): finish this. |
121 typedef base::DataPack* DataHandle; | 121 typedef base::DataPack* DataHandle; |
122 #elif defined(OS_MACOSX) | |
123 // TODO(port): figure this out | |
124 typedef void* DataHandle; | |
125 #endif | 122 #endif |
126 | 123 |
127 // Ctor/dtor are private, since we're a singleton. | 124 // Ctor/dtor are private, since we're a singleton. |
128 ResourceBundle(); | 125 ResourceBundle(); |
129 ~ResourceBundle(); | 126 ~ResourceBundle(); |
130 | 127 |
131 // Free skia_images_. | 128 // Free skia_images_. |
132 void FreeImages(); | 129 void FreeImages(); |
133 | 130 |
134 // Try to load the locale specific strings from an external data module. | 131 // Try to load the locale specific strings from an external data module. |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 scoped_ptr<ChromeFont> large_font_; | 171 scoped_ptr<ChromeFont> large_font_; |
175 scoped_ptr<ChromeFont> web_font_; | 172 scoped_ptr<ChromeFont> web_font_; |
176 | 173 |
177 static ResourceBundle* g_shared_instance_; | 174 static ResourceBundle* g_shared_instance_; |
178 | 175 |
179 DISALLOW_EVIL_CONSTRUCTORS(ResourceBundle); | 176 DISALLOW_EVIL_CONSTRUCTORS(ResourceBundle); |
180 }; | 177 }; |
181 | 178 |
182 #endif // CHROME_COMMON_RESOURCE_BUNDLE_H__ | 179 #endif // CHROME_COMMON_RESOURCE_BUNDLE_H__ |
183 | 180 |
OLD | NEW |