diff options
author | kalman <kalman@chromium.org> | 2015-04-15 12:20:48 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-15 19:21:14 +0000 |
commit | f91cb89ccc9f4621d6b8d8928f70788d212def9b (patch) | |
tree | fb88e9065aaf5c445728454397362a03e66ad7d3 /chrome/renderer | |
parent | ca0d5d46c95fa5e8d5c89a979baba0c5b6bbefd0 (diff) | |
download | chromium_src-f91cb89ccc9f4621d6b8d8928f70788d212def9b.zip chromium_src-f91cb89ccc9f4621d6b8d8928f70788d212def9b.tar.gz chromium_src-f91cb89ccc9f4621d6b8d8928f70788d212def9b.tar.bz2 |
Reland: Move Extension ScriptContext creation into ScriptContextSet.
This is relanding both 320971 and 322902 which were reverted in 323869.
See https://codereview.chromium.org/995283004 for the original review.
Previously extensions::Dispatcher was responsible for creating ScriptContexts
then Adding them to its ScriptContextSet. Now, ScriptContextSet creates them
itself. This prepares the Extension system for later changing to lazily or
asynchronously creating ScriptContexts.
BUG=466373
R=rockot@chromium.org
Review URL: https://codereview.chromium.org/1060463004
Cr-Commit-Position: refs/heads/master@{#325287}
Diffstat (limited to 'chrome/renderer')
-rw-r--r-- | chrome/renderer/extensions/webstore_bindings.cc | 6 | ||||
-rw-r--r-- | chrome/renderer/extensions/webstore_bindings.h | 7 |
2 files changed, 8 insertions, 5 deletions
diff --git a/chrome/renderer/extensions/webstore_bindings.cc b/chrome/renderer/extensions/webstore_bindings.cc index c364d2c..97e8075 100644 --- a/chrome/renderer/extensions/webstore_bindings.cc +++ b/chrome/renderer/extensions/webstore_bindings.cc @@ -14,6 +14,7 @@ #include "extensions/renderer/script_context.h" #include "third_party/WebKit/public/web/WebDocument.h" #include "third_party/WebKit/public/web/WebElement.h" +#include "third_party/WebKit/public/web/WebLocalFrame.h" #include "third_party/WebKit/public/web/WebNode.h" #include "third_party/WebKit/public/web/WebNodeList.h" #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" @@ -22,7 +23,6 @@ using blink::WebDocument; using blink::WebElement; -using blink::WebFrame; using blink::WebNode; using blink::WebNodeList; using blink::WebUserGestureIndicator; @@ -79,7 +79,7 @@ void WebstoreBindings::Install( std::string webstore_item_id; std::string error; - WebFrame* frame = context()->web_frame(); + blink::WebLocalFrame* frame = context()->web_frame(); if (!GetWebstoreItemIdFromFrame( frame, preferred_store_link_url, &webstore_item_id, &error)) { @@ -102,7 +102,7 @@ void WebstoreBindings::Install( // static bool WebstoreBindings::GetWebstoreItemIdFromFrame( - WebFrame* frame, + blink::WebLocalFrame* frame, const std::string& preferred_store_link_url, std::string* webstore_item_id, std::string* error) { diff --git a/chrome/renderer/extensions/webstore_bindings.h b/chrome/renderer/extensions/webstore_bindings.h index 864003e..cdffce7 100644 --- a/chrome/renderer/extensions/webstore_bindings.h +++ b/chrome/renderer/extensions/webstore_bindings.h @@ -9,7 +9,10 @@ #include "chrome/common/extensions/webstore_install_result.h" #include "chrome/renderer/extensions/chrome_v8_extension_handler.h" #include "extensions/renderer/object_backed_native_handler.h" -#include "third_party/WebKit/public/web/WebFrame.h" + +namespace blink { +class WebLocalFrame; +} namespace extensions { @@ -42,7 +45,7 @@ class WebstoreBindings : public ObjectBackedNativeHandler, // parameter will be populated with the ID. On failure, false will be returned // and |error| will be populated with the error. static bool GetWebstoreItemIdFromFrame( - blink::WebFrame* frame, + blink::WebLocalFrame* frame, const std::string& preferred_store_link_url, std::string* webstore_item_id, std::string* error); |