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

Unified Diff: extensions/browser/api/execute_code_function.h

Issue 942533003: Enable <webview>.executeScript outside of Apps and Extensions [1] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@decouple_brower_isolated_world_routingid_user_script_UserScriptSet_non_hostset_2
Patch Set: Add a test. Created 5 years, 9 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/browser/api/execute_code_function.h
diff --git a/extensions/browser/api/execute_code_function.h b/extensions/browser/api/execute_code_function.h
index 9e1593a9d3ea3a87a120c11b925ab238a8327c11..db0f441c8149baa5391e216057478f1b77181a7b 100644
--- a/extensions/browser/api/execute_code_function.h
+++ b/extensions/browser/api/execute_code_function.h
@@ -8,6 +8,7 @@
#include "extensions/browser/extension_function.h"
#include "extensions/browser/script_executor.h"
#include "extensions/common/api/extension_types.h"
+#include "extensions/common/host_id.h"
namespace extensions {
@@ -39,6 +40,11 @@ class ExecuteCodeFunction : public AsyncExtensionFunction {
// The injection details.
scoped_ptr<core_api::extension_types::InjectDetails> details_;
+ const HostID& host_id() const { return host_id_; }
+ void set_host_id(HostID host_id) {
+ host_id_ = host_id;
+ }
+
private:
// Called when contents from the file whose path is specified in JSON
// arguments has been loaded.
@@ -65,6 +71,9 @@ class ExecuteCodeFunction : public AsyncExtensionFunction {
// The URL of the file being injected into the page.
GURL file_url_;
+
+ // The ID of the injection host.
+ HostID host_id_;
};
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698