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

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

Issue 394313002: Add support for loading pak files from arbitrary file regions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Win implementation Created 6 years, 5 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 1f40728ac25f1717f748a65e4fd7625b802504c2..9e5b94e22e8cd4d50157118b6dea94f203b3240f 100644
--- a/ui/base/resource/resource_bundle.h
+++ b/ui/base/resource/resource_bundle.h
@@ -10,6 +10,7 @@
#include "base/basictypes.h"
#include "base/containers/hash_tables.h"
+#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
@@ -26,7 +27,6 @@
class SkBitmap;
namespace base {
-class File;
class Lock;
class RefCountedStaticMemory;
}
@@ -166,6 +166,11 @@ class UI_BASE_EXPORT ResourceBundle {
// Same as above but using an already open file.
void AddDataPackFromFile(base::File file, ScaleFactor scale_factor);
+ // Same as above but using only a region (offset + size) of the file.
+ void AddDataPackFromFileRegion(base::File file,
+ const base::File::Region& region,
+ ScaleFactor scale_factor);
+
// Same as AddDataPackFromPath but does not log an error if the pack fails to
// load.
void AddOptionalDataPackFromPath(const base::FilePath& path,

Powered by Google App Engine
This is Rietveld 408576698