summaryrefslogtreecommitdiffstats
path: root/extensions/browser/extension_web_contents_observer.cc
diff options
context:
space:
mode:
authorrdevlin.cronin <rdevlin.cronin@chromium.org>2015-02-06 16:31:55 -0800
committerCommit bot <commit-bot@chromium.org>2015-02-07 00:32:57 +0000
commitc491dbfaad049247a5d2f92ab5ad823725414e70 (patch)
treec064b1aa583a88506275d7e01cb66cbc95e6fddb /extensions/browser/extension_web_contents_observer.cc
parent32ca079014ef5145b8905d934c81f233a734ffd4 (diff)
downloadchromium_src-c491dbfaad049247a5d2f92ab5ad823725414e70.zip
chromium_src-c491dbfaad049247a5d2f92ab5ad823725414e70.tar.gz
chromium_src-c491dbfaad049247a5d2f92ab5ad823725414e70.tar.bz2
[Extensions] Propagate activeTab hosts to extension background pages
Let extensions with active tab use XHR in background pages to any hosts that they have active tab on. Also move tab_finder to //extensions. BUG=452688 Review URL: https://codereview.chromium.org/890083002 Cr-Commit-Position: refs/heads/master@{#315147}
Diffstat (limited to 'extensions/browser/extension_web_contents_observer.cc')
-rw-r--r--extensions/browser/extension_web_contents_observer.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/extensions/browser/extension_web_contents_observer.cc b/extensions/browser/extension_web_contents_observer.cc
index 0a816ae..ba13edd 100644
--- a/extensions/browser/extension_web_contents_observer.cc
+++ b/extensions/browser/extension_web_contents_observer.cc
@@ -75,9 +75,12 @@ void ExtensionWebContentsObserver::RenderViewCreated(
// ExtensionDispatcher knows what Extension is active, not just its ID.
// This is important for classifying the Extension's JavaScript context
// correctly (see ExtensionDispatcher::ClassifyJavaScriptContext).
+ // We also have to include the tab-specific permissions here, since it's
+ // an extension process.
render_view_host->Send(
new ExtensionMsg_Loaded(std::vector<ExtensionMsg_Loaded_Params>(
- 1, ExtensionMsg_Loaded_Params(extension))));
+ 1, ExtensionMsg_Loaded_Params(
+ extension, true /* include tab permissions */))));
render_view_host->Send(
new ExtensionMsg_ActivateExtension(extension->id()));
break;