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

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: updated years in copyright 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
« no previous file with comments | « ui/base/resource/data_pack_unittest.cc ('k') | ui/base/resource/resource_bundle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..404e7965ec59701fc89d3c96bd49717692aa39b7 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,
« no previous file with comments | « ui/base/resource/data_pack_unittest.cc ('k') | ui/base/resource/resource_bundle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698