| Index: chrome/renderer/extensions/bindings_utils.h
|
| diff --git a/chrome/renderer/extensions/bindings_utils.h b/chrome/renderer/extensions/bindings_utils.h
|
| index f2c96dffca004f19f29c55d37ddd09824e61dbbf..ae3fafdf586a92ab2d6885df680fa61260a6c8e7 100644
|
| --- a/chrome/renderer/extensions/bindings_utils.h
|
| +++ b/chrome/renderer/extensions/bindings_utils.h
|
| @@ -15,6 +15,8 @@
|
| #include <list>
|
| #include <string>
|
|
|
| +class Extension;
|
| +class ExtensionDispatcher;
|
| class RenderView;
|
|
|
| namespace WebKit {
|
| @@ -30,13 +32,11 @@ class ExtensionBase : public v8::Extension {
|
| ExtensionBase(const char* name,
|
| const char* source,
|
| int dep_count,
|
| - const char** deps)
|
| - : v8::Extension(name, source, dep_count, deps) {}
|
| -
|
| - // Note: do not call this function before or during the chromeHidden.onLoad
|
| - // event dispatch. The URL might not have been committed yet and might not
|
| - // be an extension URL.
|
| - static std::string ExtensionIdForCurrentContext();
|
| + const char** deps,
|
| + ExtensionDispatcher* extension_dispatcher)
|
| + : v8::Extension(name, source, dep_count, deps),
|
| + extension_dispatcher_(extension_dispatcher) {
|
| + }
|
|
|
| // Derived classes should call this at the end of their implementation in
|
| // order to expose common native functions, like GetChromeHidden, to the
|
| @@ -45,6 +45,13 @@ class ExtensionBase : public v8::Extension {
|
| GetNativeFunction(v8::Handle<v8::String> name);
|
|
|
| protected:
|
| + // Note: do not call this function before or during the chromeHidden.onLoad
|
| + // event dispatch. The URL might not have been committed yet and might not
|
| + // be an extension URL.
|
| + const Extension* GetExtensionForCurrentContext(
|
| + v8::Handle<v8::Context> context);
|
| + bool CheckPermissionForCurrentContext(const std::string& function_name);
|
| +
|
| // Returns a hidden variable for use by the bindings that is unreachable
|
| // by the page.
|
| static v8::Handle<v8::Value> GetChromeHidden(const v8::Arguments& args);
|
|
|