summaryrefslogtreecommitdiffstats
path: root/extensions/browser/extension_api_frame_id_map.h
diff options
context:
space:
mode:
authorrob <rob@robwu.nl>2016-02-07 09:28:57 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-07 17:30:20 +0000
commit52277c872b368db45bc6d2f2bd9a4b7a0eb2ce8d (patch)
tree98016ba6f92be725a32ab1d8b773781441548753 /extensions/browser/extension_api_frame_id_map.h
parent057f009b6b02d1e94409a6d88702f37a07598de0 (diff)
downloadchromium_src-52277c872b368db45bc6d2f2bd9a4b7a0eb2ce8d.zip
chromium_src-52277c872b368db45bc6d2f2bd9a4b7a0eb2ce8d.tar.gz
chromium_src-52277c872b368db45bc6d2f2bd9a4b7a0eb2ce8d.tar.bz2
Add frameId to chrome.tabs.executeScript/insertCSS
- Re-implemented https://codereview.chromium.org/952473002/, with all checks at the browser side instead of just the renderer. - Use the last committed URL for checking permissions instead of the visible URL. As a result, executeScript/insertCSS will now succeed in frames where the currently committed page is scriptable by extensions, but the target of the pending navigation is is not. - ExecuteScript: Do not send IPC to non-live frames (they're not going to reply anyway). - Include URL in the error if the extension has the tabs permission (follow-up to TODO from https://codereview.chromium.org/1414223005). BUG=63979,551626 TEST=./browser_tests --gtest_filter=ExecuteScriptApiTest.* CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation Review URL: https://codereview.chromium.org/1628423002 Cr-Commit-Position: refs/heads/master@{#374057}
Diffstat (limited to 'extensions/browser/extension_api_frame_id_map.h')
-rw-r--r--extensions/browser/extension_api_frame_id_map.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/extensions/browser/extension_api_frame_id_map.h b/extensions/browser/extension_api_frame_id_map.h
index c3af8b3..8bb1422 100644
--- a/extensions/browser/extension_api_frame_id_map.h
+++ b/extensions/browser/extension_api_frame_id_map.h
@@ -48,6 +48,9 @@ class ExtensionApiFrameIdMap {
// An invalid extension API frame ID.
static const int kInvalidFrameId;
+ // Extension API frame ID of the top-level frame.
+ static const int kTopFrameId;
+
static ExtensionApiFrameIdMap* Get();
// Get the extension API frame ID for |rfh|.