Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(830)

Unified Diff: extensions/browser/extension_api_frame_id_map.cc

Issue 2002763003: webRequest: reliably determine tabId (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@webRequest-testing-unload
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/browser/extension_api_frame_id_map.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/extension_api_frame_id_map.cc
diff --git a/extensions/browser/extension_api_frame_id_map.cc b/extensions/browser/extension_api_frame_id_map.cc
index d8566f97598cca9bd3f513da1ec5e5baf7dc40c1..39362e9871b7c0eba1154959ff78fc0cad5c324e 100644
--- a/extensions/browser/extension_api_frame_id_map.cc
+++ b/extensions/browser/extension_api_frame_id_map.cc
@@ -132,6 +132,16 @@ int ExtensionApiFrameIdMap::GetParentFrameId(
}
// static
+void ExtensionApiFrameIdMap::GetTabAndWindowId(content::RenderFrameHost* rfh,
+ int* tab_id_out,
+ int* window_id_out) {
+ ExtensionApiFrameIdMapHelper* helper =
Devlin 2016/05/23 16:23:18 (if we keep this, dcheck ui thread) Why do we do
robwu 2016/05/23 17:55:55 I didn't realize that the tab ID was immediately s
+ ExtensionApiFrameIdMap::Get()->helper_.get();
+ if (helper)
+ helper->GetTabAndWindowId(rfh, tab_id_out, window_id_out);
+}
+
+// static
content::RenderFrameHost* ExtensionApiFrameIdMap::GetRenderFrameHostById(
content::WebContents* web_contents,
int frame_id) {
« no previous file with comments | « extensions/browser/extension_api_frame_id_map.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698