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

Unified Diff: ui/base/resource/resource_bundle.h

Issue 1969313005: [headless] Embed pak file into binary. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resurrected Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: ui/base/resource/resource_bundle.h
diff --git a/ui/base/resource/resource_bundle.h b/ui/base/resource/resource_bundle.h
index cce0d8dbed02a4e4aaab0f9c049e31a34420745b..aac489176e55c9c79f4da93a3eed16a181fc9272 100644
--- a/ui/base/resource/resource_bundle.h
+++ b/ui/base/resource/resource_bundle.h
@@ -146,6 +146,7 @@ class UI_BASE_EXPORT ResourceBundle {
// Returns true after the global resource loader instance has been created.
static bool HasSharedInstance();
+ // Initialize the ResourceBundle using data pack from given buffer.
// Return the global resource loader instance.
static ResourceBundle& GetSharedInstance();
@@ -170,6 +171,10 @@ class UI_BASE_EXPORT ResourceBundle {
const base::MemoryMappedFile::Region& region,
ScaleFactor scale_factor);
+ // Same as above but using contents of the given buffer.
+ void AddDataPackFromBuffer(base::StringPiece buffer,
+ ScaleFactor scale_factor);
+
// Same as AddDataPackFromPath but does not log an error if the pack fails to
// load.
void AddOptionalDataPackFromPath(const base::FilePath& path,
@@ -335,6 +340,10 @@ class UI_BASE_EXPORT ResourceBundle {
void LoadTestResources(const base::FilePath& path,
const base::FilePath& locale_path);
+ // Load test resources from given buffers.
+ void LoadTestResourcesFromBuffer(base::StringPiece data,
sky 2017/02/08 22:22:58 Is this used?
altimin 2017/02/09 00:13:52 No, thanks.
+ base::StringPiece locale_data);
+
// Unload the locale specific strings and prepares to load new ones. See
// comments for ReloadLocaleResources().
void UnloadLocaleResources();

Powered by Google App Engine
This is Rietveld 408576698