diff options
author | nasko <nasko@chromium.org> | 2016-02-09 14:41:11 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-09 22:42:50 +0000 |
commit | e419e2171ce22acc291c5c30c251633daeb0740d (patch) | |
tree | 0d169839f0e30d6f1cd9482fc2e6fc26373ca243 /extensions/browser/extension_api_frame_id_map.h | |
parent | fbcb5dee51bebbd01fc7ace6ebe6d9713a0624ca (diff) | |
download | chromium_src-e419e2171ce22acc291c5c30c251633daeb0740d.zip chromium_src-e419e2171ce22acc291c5c30c251633daeb0740d.tar.gz chromium_src-e419e2171ce22acc291c5c30c251633daeb0740d.tar.bz2 |
Refactor the implementation of the webNavigation extension API.
The webNavigation extension API does not work properly with out-of-process
iframes and will be broken with the upcoming changes in navigation
code (PlzNavigate). This CL is aiming to refactor the implementation to
use the NavigationHandle API, which is compatible with PlzNavigate and
helps hide some of the nasty details of cross-process navigations.
This CL depends on new APIs added to NavigationHandle in https://codereview.chromium.org/1667163002/.
BUG=584493
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation
Review URL: https://codereview.chromium.org/1670673003
Cr-Commit-Position: refs/heads/master@{#374505}
Diffstat (limited to 'extensions/browser/extension_api_frame_id_map.h')
-rw-r--r-- | extensions/browser/extension_api_frame_id_map.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/extensions/browser/extension_api_frame_id_map.h b/extensions/browser/extension_api_frame_id_map.h index 8bb1422..d1fee76 100644 --- a/extensions/browser/extension_api_frame_id_map.h +++ b/extensions/browser/extension_api_frame_id_map.h @@ -14,6 +14,7 @@ #include "base/synchronization/lock.h" namespace content { +class NavigationHandle; class RenderFrameHost; class WebContents; } // namespace content @@ -56,9 +57,15 @@ class ExtensionApiFrameIdMap { // Get the extension API frame ID for |rfh|. static int GetFrameId(content::RenderFrameHost* rfh); + // Get the extension API frame ID for |navigation_handle|. + static int GetFrameId(content::NavigationHandle* navigation_handle); + // Get the extension API frame ID for the parent of |rfh|. static int GetParentFrameId(content::RenderFrameHost* rfh); + // Get the extension API frame ID for the parent of |navigation_handle|. + static int GetParentFrameId(content::NavigationHandle* navigation_handle); + // Find the current RenderFrameHost for a given WebContents and extension // frame ID. // Returns nullptr if not found. |