summaryrefslogtreecommitdiffstats
path: root/base/data_pack.h
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-27 20:45:08 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-27 20:45:08 +0000
commitd8fef52b071be812fd8a0f7ebea6c577bdb38592 (patch)
tree3ad1d267a3d978e4e68c0f3c49c3781e155e1a3f /base/data_pack.h
parent19e0ff7bf0b74a121d52a75b1d883222d266b789 (diff)
downloadchromium_src-d8fef52b071be812fd8a0f7ebea6c577bdb38592.zip
chromium_src-d8fef52b071be812fd8a0f7ebea6c577bdb38592.tar.gz
chromium_src-d8fef52b071be812fd8a0f7ebea6c577bdb38592.tar.bz2
Modify DataPacks so they can return RefCountedStaticMemory objects.
(This is in preparation for a very large reworking of BrowserThemeProvider). BUG=http://crbug.com/21121 Review URL: http://codereview.chromium.org/338027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30241 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/data_pack.h')
-rw-r--r--base/data_pack.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/base/data_pack.h b/base/data_pack.h
index 02a3849..7c9abde 100644
--- a/base/data_pack.h
+++ b/base/data_pack.h
@@ -10,6 +10,7 @@
#define BASE_DATA_PACK_H_
#include "base/basictypes.h"
+#include "base/ref_counted_memory.h"
#include "base/scoped_ptr.h"
namespace file_util {
@@ -32,7 +33,12 @@ class DataPack {
// Get resource by id |resource_id|, filling in |data|.
// The data is owned by the DataPack object and should not be modified.
// Returns false if the resource id isn't found.
- bool Get(uint32_t resource_id, StringPiece* data);
+ bool GetStringPiece(uint32_t resource_id, StringPiece* data);
+
+ // Like GetStringPiece(), but returns a reference to memory. This interface
+ // is used for image data, while the StringPiece interface is usually used
+ // for localization strings.
+ RefCountedStaticMemory* GetStaticMemory(uint32_t resource_id);
private:
// The memory-mapped data.