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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 12226022: <webview>: Store <webview> embedder info in ExtensionRendererState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 2db6514b6d96651fa5b270f296a59b20c7cd7f5d..d089cda6bacb71cb9a7908d86482eab0600cdb0f 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -837,6 +837,20 @@ void WebContentsImpl::GetRenderViewHostAtPosition(
callback.Run(GetRenderViewHost(), x, y);
}
+WebContents* WebContentsImpl::GetEmbedderWebContents() const {
+ BrowserPluginGuest* guest = GetBrowserPluginGuest();
+ if (guest)
+ return guest->embedder_web_contents();
+ return NULL;
+}
+
+int WebContentsImpl::GetInstanceID() const {
+ BrowserPluginGuest* guest = GetBrowserPluginGuest();
+ if (guest)
+ return guest->instance_id();
+ return 0;
+}
+
int WebContentsImpl::GetRoutingID() const {
if (!GetRenderViewHost())
return MSG_ROUTING_NONE;
@@ -3450,11 +3464,11 @@ RenderViewHostImpl* WebContentsImpl::GetRenderViewHostImpl() {
return static_cast<RenderViewHostImpl*>(GetRenderViewHost());
}
-BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() {
+BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() const {
return browser_plugin_guest_.get();
}
-BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() {
+BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() const {
return browser_plugin_embedder_.get();
}

Powered by Google App Engine
This is Rietveld 408576698