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

Unified Diff: chrome/renderer/resources/extensions/declarative_content_custom_bindings.js

Issue 344433003: Prepare declarativeContent API for new script injection feature. Added Javascript types and functio… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address first round review comments and fix test build failure Created 6 years, 6 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: chrome/renderer/resources/extensions/declarative_content_custom_bindings.js
diff --git a/chrome/renderer/resources/extensions/declarative_content_custom_bindings.js b/chrome/renderer/resources/extensions/declarative_content_custom_bindings.js
index fe154f7ee0a08ad01b7a4ecc39260acad898f127..9a5e76c0efc97ed7fa17084c05592e806d5e1e02 100644
--- a/chrome/renderer/resources/extensions/declarative_content_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/declarative_content_custom_bindings.js
@@ -51,6 +51,9 @@ binding.registerCustomHook( function(api) {
}
// Setup all data types for the declarative content API.
+ declarativeContent.ContentScript = function(parameters) {
+ setupInstance(this, parameters, 'ContentScript');
+ };
declarativeContent.PageStateMatcher = function(parameters) {
setupInstance(this, parameters, 'PageStateMatcher');
if ($Object.hasOwnProperty(this, 'css')) {
@@ -60,6 +63,9 @@ binding.registerCustomHook( function(api) {
declarativeContent.ShowPageAction = function(parameters) {
setupInstance(this, parameters, 'ShowPageAction');
};
+ declarativeContent.RequestContentScript = function(parameters) {
+ setupInstance(this, parameters, 'RequestContentScript');
+ };
});
exports.binding = binding.generate();

Powered by Google App Engine
This is Rietveld 408576698