| Index: chrome/browser/extensions/api/declarative_content/content_action.cc
|
| diff --git a/chrome/browser/extensions/api/declarative_content/content_action.cc b/chrome/browser/extensions/api/declarative_content/content_action.cc
|
| index cce6a867c682a79bcbcc4dd7403dcee545e85b0a..b97a29f61237b89cd6bf84b47a790074587ba718 100644
|
| --- a/chrome/browser/extensions/api/declarative_content/content_action.cc
|
| +++ b/chrome/browser/extensions/api/declarative_content/content_action.cc
|
| @@ -15,11 +15,14 @@
|
| #include "chrome/browser/extensions/extension_action_manager.h"
|
| #include "chrome/browser/extensions/extension_tab_util.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| +#include "chrome/browser/sessions/session_tab_helper.h"
|
| #include "content/public/browser/invalidate_type.h"
|
| +#include "content/public/browser/render_view_host.h"
|
| #include "content/public/browser/web_contents.h"
|
| #include "extensions/browser/extension_registry.h"
|
| #include "extensions/browser/extension_system.h"
|
| #include "extensions/common/extension.h"
|
| +#include "extensions/common/extension_messages.h"
|
|
|
| namespace extensions {
|
|
|
| @@ -302,12 +305,12 @@ ContentAction::Type RequestContentScript::GetType() const {
|
| void RequestContentScript::Apply(const std::string& extension_id,
|
| const base::Time& extension_install_time,
|
| ApplyInfo* apply_info) const {
|
| - InstructRenderProcessToInject(apply_info->tab, extension_id);
|
| + InstructRenderProcessToInject(apply_info->tab, extension_id);
|
| }
|
|
|
| void RequestContentScript::Reapply(const std::string& extension_id,
|
| - const base::Time& extension_install_time,
|
| - ApplyInfo* apply_info) const {
|
| + const base::Time& extension_install_time,
|
| + ApplyInfo* apply_info) const {
|
| InstructRenderProcessToInject(apply_info->tab, extension_id);
|
| }
|
|
|
| @@ -318,7 +321,13 @@ void RequestContentScript::Revert(const std::string& extension_id,
|
| void RequestContentScript::InstructRenderProcessToInject(
|
| content::WebContents* contents,
|
| const std::string& extension_id) const {
|
| - // TODO(markdittmer): Send ExtensionMsg to renderer.
|
| + content::RenderViewHost* render_view_host = contents->GetRenderViewHost();
|
| + render_view_host->Send(new ExtensionMsg_ExecuteDeclarativeScript(
|
| + render_view_host->GetRoutingID(),
|
| + SessionTabHelper::IdForTab(contents),
|
| + extension_id,
|
| + script_.id(),
|
| + contents->GetLastCommittedURL()));
|
| }
|
|
|
| //
|
|
|