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

Unified Diff: extensions/renderer/api_binding_hooks_test_delegate.h

Issue 2853023002: [Extensions Bindings] Add native declarativeContent verification (Closed)
Patch Set: lazyboy's Created 3 years, 8 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: extensions/renderer/api_binding_hooks_test_delegate.h
diff --git a/extensions/renderer/api_binding_hooks_test_delegate.h b/extensions/renderer/api_binding_hooks_test_delegate.h
index ee17e5ea55adcd5fd051cd6bb83c56033f41e717..94233cb507bdc7c8abea38f217d3215a9c73f06d 100644
--- a/extensions/renderer/api_binding_hooks_test_delegate.h
+++ b/extensions/renderer/api_binding_hooks_test_delegate.h
@@ -34,12 +34,18 @@ class APIBindingHooksTestDelegate : public APIBindingHooksDelegate {
std::vector<v8::Local<v8::Value>>*,
const APITypeReferenceMap&)>;
+ using TemplateInitializer = base::Callback<void(v8::Isolate*,
+ v8::Local<v8::ObjectTemplate>,
+ const APITypeReferenceMap&)>;
+
// Adds a custom |handler| for the method with the given |name|.
void AddHandler(base::StringPiece name, const RequestHandler& handler);
// Creates events with the given factory.
void SetCustomEvent(const CustomEventFactory& custom_event);
+ void SetTemplateInitializer(const TemplateInitializer& initializer);
+
// APIBindingHooksDelegate:
bool CreateCustomEvent(v8::Local<v8::Context> context,
const binding::RunJSFunctionSync& run_js_sync,
@@ -51,10 +57,14 @@ class APIBindingHooksTestDelegate : public APIBindingHooksDelegate {
v8::Local<v8::Context> context,
std::vector<v8::Local<v8::Value>>* arguments,
const APITypeReferenceMap& refs) override;
+ void InitializeTemplate(v8::Isolate* isolate,
+ v8::Local<v8::ObjectTemplate> object_template,
+ const APITypeReferenceMap& type_refs) override;
private:
std::map<std::string, RequestHandler> request_handlers_;
CustomEventFactory custom_event_;
+ TemplateInitializer template_initializer_;
DISALLOW_COPY_AND_ASSIGN(APIBindingHooksTestDelegate);
};
« no previous file with comments | « extensions/renderer/api_binding_hooks_delegate.h ('k') | extensions/renderer/api_binding_hooks_test_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698