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

Side by Side Diff: ui/base/resource/resource_bundle.h

Issue 7538030: Remove USE_BASE_DATA_PACK from build_config.h since it's only (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: os_posix Created 9 years, 4 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 | « build/build_config.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 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 #ifndef UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_ 5 #ifndef UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_
6 #define UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_ 6 #define UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 10
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 FilePath path_; 200 FilePath path_;
201 201
202 DISALLOW_COPY_AND_ASSIGN(LoadedDataPack); 202 DISALLOW_COPY_AND_ASSIGN(LoadedDataPack);
203 }; 203 };
204 204
205 // We define a DataHandle typedef to abstract across how data is stored 205 // We define a DataHandle typedef to abstract across how data is stored
206 // across platforms. 206 // across platforms.
207 #if defined(OS_WIN) 207 #if defined(OS_WIN)
208 // Windows stores resources in DLLs, which are managed by HINSTANCE. 208 // Windows stores resources in DLLs, which are managed by HINSTANCE.
209 typedef HINSTANCE DataHandle; 209 typedef HINSTANCE DataHandle;
210 #elif defined(USE_BASE_DATA_PACK) 210 #elif defined(OS_POSIX)
211 // Linux uses base::DataPack. 211 // Everyone else uses base::DataPack.
212 typedef DataPack* DataHandle; 212 typedef DataPack* DataHandle;
213 #endif 213 #endif
214 214
215 // Ctor/dtor are private, since we're a singleton. 215 // Ctor/dtor are private, since we're a singleton.
216 ResourceBundle(); 216 ResourceBundle();
217 ~ResourceBundle(); 217 ~ResourceBundle();
218 218
219 // Free skia_images_. 219 // Free skia_images_.
220 void FreeImages(); 220 void FreeImages();
221 221
222 // Load the main resources. 222 // Load the main resources.
223 void LoadCommonResources(); 223 void LoadCommonResources();
224 224
225 // Try to load the locale specific strings from an external data module. 225 // Try to load the locale specific strings from an external data module.
226 // Returns the locale that is loaded. 226 // Returns the locale that is loaded.
227 std::string LoadLocaleResources(const std::string& pref_locale); 227 std::string LoadLocaleResources(const std::string& pref_locale);
228 228
229 // Load test resources in given path. 229 // Load test resources in given path.
230 void LoadTestResources(const FilePath& path); 230 void LoadTestResources(const FilePath& path);
231 231
232 // Unload the locale specific strings and prepares to load new ones. See 232 // Unload the locale specific strings and prepares to load new ones. See
233 // comments for ReloadSharedInstance(). 233 // comments for ReloadSharedInstance().
234 void UnloadLocaleResources(); 234 void UnloadLocaleResources();
235 235
236 // Initialize all the gfx::Font members if they haven't yet been initialized. 236 // Initialize all the gfx::Font members if they haven't yet been initialized.
237 void LoadFontsIfNecessary(); 237 void LoadFontsIfNecessary();
238 238
239 #if defined(USE_BASE_DATA_PACK) 239 #if defined(OS_POSIX)
240 // Returns the full pathname of the main resources file to load. May return 240 // Returns the full pathname of the main resources file to load. May return
241 // an empty string if no main resources data files are found. 241 // an empty string if no main resources data files are found.
242 static FilePath GetResourcesFilePath(); 242 static FilePath GetResourcesFilePath();
243 243
244 static FilePath GetLargeIconResourcesFilePath(); 244 static FilePath GetLargeIconResourcesFilePath();
245 #endif 245 #endif
246 246
247 // Returns the full pathname of the locale file to load. May return an empty 247 // Returns the full pathname of the locale file to load. May return an empty
248 // string if no locale data files are found. 248 // string if no locale data files are found.
249 static FilePath GetLocaleFilePath(const std::string& app_locale); 249 static FilePath GetLocaleFilePath(const std::string& app_locale);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 295
296 DISALLOW_COPY_AND_ASSIGN(ResourceBundle); 296 DISALLOW_COPY_AND_ASSIGN(ResourceBundle);
297 }; 297 };
298 298
299 } // namespace ui 299 } // namespace ui
300 300
301 // TODO(beng): Someday, maybe, get rid of this. 301 // TODO(beng): Someday, maybe, get rid of this.
302 using ui::ResourceBundle; 302 using ui::ResourceBundle;
303 303
304 #endif // UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_ 304 #endif // UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_
OLDNEW
« no previous file with comments | « build/build_config.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698