Index: chrome/renderer/extensions/chrome_v8_context.h |
diff --git a/chrome/renderer/extensions/chrome_v8_context.h b/chrome/renderer/extensions/chrome_v8_context.h |
index 19165ab608d55b44b8b874c99ed46f185c2137c6..16c4705f81abf24fb0eed76b1d0485d0b23802d5 100644 |
--- a/chrome/renderer/extensions/chrome_v8_context.h |
+++ b/chrome/renderer/extensions/chrome_v8_context.h |
@@ -7,6 +7,7 @@ |
#pragma once |
#include <string> |
+#include <vector> |
#include "base/basictypes.h" |
#include "v8/include/v8.h" |
@@ -19,6 +20,8 @@ namespace content { |
class RenderView; |
} |
+class ChromeV8Extension; |
+ |
// Chrome's wrapper for a v8 context. |
// |
// TODO(aa): Consider converting this back to a set of bindings_utils. It would |
@@ -79,6 +82,10 @@ class ChromeV8Context { |
v8::Handle<v8::Value>* argv, |
v8::Handle<v8::Value>* result) const; |
+ void RegisterExtension(ChromeV8Extension* extension); |
Aaron Boodman
2012/02/16 01:54:42
Needs comments.
|
+ |
+ v8::Handle<v8::Object> natives() const { return natives_; } |
+ |
private: |
// The v8 context the bindings are accessible to. We keep a strong reference |
// to it for simplicity. In the case of content scripts, this is necessary |
@@ -89,6 +96,8 @@ class ChromeV8Context { |
// distinguish the two cases. |
v8::Persistent<v8::Context> v8_context_; |
+ v8::Persistent<v8::Object> natives_; |
Aaron Boodman
2012/02/16 01:54:42
needs comments.
|
+ |
// The WebFrame associated with this context. This can be NULL because this |
// object can outlive is destroyed asynchronously. |
WebKit::WebFrame* web_frame_; |
@@ -96,6 +105,9 @@ class ChromeV8Context { |
// The extension ID this context is associated with. |
std::string extension_id_; |
+ // The list of extensions this context owns. |
+ std::vector<ChromeV8Extension*> extensions_; |
+ |
DISALLOW_COPY_AND_ASSIGN(ChromeV8Context); |
}; |