summaryrefslogtreecommitdiffstats
path: root/extensions/browser/process_manager.h
diff options
context:
space:
mode:
authorrob <rob@robwu.nl>2015-12-06 04:39:45 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-06 12:40:24 +0000
commitcdcc4b87e40c1b783541444d9484f33e81a177ba (patch)
treef26bde41f7147e65bce02b6fbeea08e263ff6d52 /extensions/browser/process_manager.h
parent0142f2f3d0e3e1ac1311101fcd10e5cd83069883 (diff)
downloadchromium_src-cdcc4b87e40c1b783541444d9484f33e81a177ba.zip
chromium_src-cdcc4b87e40c1b783541444d9484f33e81a177ba.tar.gz
chromium_src-cdcc4b87e40c1b783541444d9484f33e81a177ba.tar.bz2
Track all extension frames in ProcessManager, inspect extensionoptions
ProcessManager::GetRenderFrameHostsForExtension did not return all RFHs for a given extension, because of two errors: 1. An extension can have multiple SiteInstances, so SiteInstances should not be compared by pointer. 2. ExtensionWebContentsObserver failed to register RFHs after a process swap. I discovered this when I noticed that tests started to fail unexpectedly after applying https://codereview.chromium.org/1413543005. That patch changes the extension messaging API, to route messages to RFHs instead of processes. This requires extension frames to be tracked correctly... Extension tabs, frames, etc. are now visible at "Inspect views" in the extensions view (when developer mode is enabled), thanks to the fact that all extension frames are now being tracked (excluding extension frames that are hosted in a view without classification, e.g. developer tools and most of the GuestViews). BUG=432875,550022 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation TEST=ExtensionApiTest.MessagingNoBackground does not fail any more with https://codereview.chromium.org/1413543005 after applying this patch. DeveloperPrivateApiTest.InspectEmbeddedOptionsPage passes. ProcessManagerBrowserTest.NoBackgroundPage passes. ProcessManagerBrowserTest.FrameClassification passes with and without OOPIF. Review URL: https://codereview.chromium.org/1413853005 Cr-Commit-Position: refs/heads/master@{#363368}
Diffstat (limited to 'extensions/browser/process_manager.h')
-rw-r--r--extensions/browser/process_manager.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/extensions/browser/process_manager.h b/extensions/browser/process_manager.h
index 9d44453..c93bd80 100644
--- a/extensions/browser/process_manager.h
+++ b/extensions/browser/process_manager.h
@@ -56,6 +56,7 @@ class ProcessManager : public KeyedService,
content::RenderFrameHost* render_frame_host,
const Extension* extension);
void UnregisterRenderFrameHost(content::RenderFrameHost* render_frame_host);
+ void DidNavigateRenderFrameHost(content::RenderFrameHost* render_frame_host);
// Returns the SiteInstance that the given URL belongs to.
// TODO(aa): This only returns correct results for extensions and packaged
@@ -71,6 +72,8 @@ class ProcessManager : public KeyedService,
ProcessManager::FrameSet GetRenderFrameHostsForExtension(
const std::string& extension_id);
+ bool IsRenderFrameHostRegistered(content::RenderFrameHost* render_frame_host);
+
void AddObserver(ProcessManagerObserver* observer);
void RemoveObserver(ProcessManagerObserver* observer);