summaryrefslogtreecommitdiffstats
path: root/extensions/extensions_tests.gypi
diff options
context:
space:
mode:
authorrob <rob@robwu.nl>2016-01-06 13:22:09 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-06 21:22:58 +0000
commit3e2a0730e0dfb9c4dcbce45eea275270db900e90 (patch)
treebb5daf2237e4791771a94c2341d8764a7fe7d7b7 /extensions/extensions_tests.gypi
parent8bdc571018faac493cb358ea1f8b7314b9178aa4 (diff)
downloadchromium_src-3e2a0730e0dfb9c4dcbce45eea275270db900e90.zip
chromium_src-3e2a0730e0dfb9c4dcbce45eea275270db900e90.tar.gz
chromium_src-3e2a0730e0dfb9c4dcbce45eea275270db900e90.tar.bz2
Use FrameTreeNode ID as frameId in extension APIs
Use FrameTreeNode IDs instead of RenderFrame routing IDs as "frame id" in the extension APIs (webNavigation, webRequest, extension messaging) because FTN IDs are globally unique, and RFH IDs are not. This extends the public content API with: - RenderFrameHost::FromFrameTreeNodeId - RenderFrameHost::GetFrameTreeNodeId - WebContents::FindFrameByFrameTreeNodeId The extension APIs are modified as follows: - webRequest: * Frame IDs may be unavailable after frame removal (crbug.com/572930). * Blocking webRequest handlers may be slower than before due to an extra IO->UI->IO hop to determine the frameId (but this happens only once per frame load). - webNavigation: * processId is no longer required in chrome.webNavigation.getFrame, but marked as optional (deprecated) to make sure that the API is backwards-compatible. * frameId is constant across navigations. - Extension messaging (chrome.runtime.connect and friends): * Small change for extension developers in the following scenario: 1. Open port to tab. 2. Accept the port by listening to onConnect *in a child frame*. 3. Unload the document in the frame. Old behavior: onDisconnect was not triggered in the background until the tab was reloaded or closed. New behavior: onDisconnect is called. * Extension messaging works correctly in out-of-process frames. * Move port lifetime management from renderer to browser. * Tie port lifetime to frames instead of processes. * Only notify frames in renderers if they have accepted the port. * Remove obsolete work-around for crbug.com/520303. * Unify open/close/postMessage logic in ChromeExtensionMessageFilter (crbug.com/394383#c7) - The extension frameId logic is no longer scattered over several files, but resides in a single class (ExtensionApiFrameIdMap). - IDs are now guaranteed to be -1 or higher (before this, -2 was occasionally seen). Depends on https://codereview.chromium.org/1413853005/ BUG=432875 TEST=browser_tests --gtest_filter=\ ExtensionWebRequestApiTest.*:\ WebNavigationApiTest.*:\ ExtensionApiTest.Messaging*:\ ExternallyConnectableMessagingTest.*:\ ExternallyConnectableMessagingWithTlsChannelIdTest.* Review URL: https://codereview.chromium.org/1413543005 Cr-Commit-Position: refs/heads/master@{#367914}
Diffstat (limited to 'extensions/extensions_tests.gypi')
-rw-r--r--extensions/extensions_tests.gypi1
1 files changed, 1 insertions, 0 deletions
diff --git a/extensions/extensions_tests.gypi b/extensions/extensions_tests.gypi
index e164a8c..2c7209a 100644
--- a/extensions/extensions_tests.gypi
+++ b/extensions/extensions_tests.gypi
@@ -77,6 +77,7 @@
'browser/error_map_unittest.cc',
'browser/event_listener_map_unittest.cc',
'browser/event_router_unittest.cc',
+ 'browser/extension_api_frame_id_map_unittest.cc',
'browser/extension_icon_image_unittest.cc',
'browser/extension_pref_value_map_unittest.cc',
'browser/extension_registry_unittest.cc',