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

Side by Side 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: Updated comment on instance ID 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/public/browser/web_contents.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 int x, 829 int x,
830 int y, 830 int y,
831 const base::Callback<void(RenderViewHost*, int, int)>& callback) { 831 const base::Callback<void(RenderViewHost*, int, int)>& callback) {
832 BrowserPluginEmbedder* embedder = GetBrowserPluginEmbedder(); 832 BrowserPluginEmbedder* embedder = GetBrowserPluginEmbedder();
833 if (embedder) 833 if (embedder)
834 embedder->GetRenderViewHostAtPosition(x, y, callback); 834 embedder->GetRenderViewHostAtPosition(x, y, callback);
835 else 835 else
836 callback.Run(GetRenderViewHost(), x, y); 836 callback.Run(GetRenderViewHost(), x, y);
837 } 837 }
838 838
839 WebContents* WebContentsImpl::GetEmbedderWebContents() const {
840 BrowserPluginGuest* guest = GetBrowserPluginGuest();
841 if (guest)
842 return guest->embedder_web_contents();
843 return NULL;
844 }
845
846 int WebContentsImpl::GetEmbeddedInstanceID() const {
847 BrowserPluginGuest* guest = GetBrowserPluginGuest();
848 if (guest)
849 return guest->instance_id();
850 return 0;
851 }
852
839 int WebContentsImpl::GetRoutingID() const { 853 int WebContentsImpl::GetRoutingID() const {
840 if (!GetRenderViewHost()) 854 if (!GetRenderViewHost())
841 return MSG_ROUTING_NONE; 855 return MSG_ROUTING_NONE;
842 856
843 return GetRenderViewHost()->GetRoutingID(); 857 return GetRenderViewHost()->GetRoutingID();
844 } 858 }
845 859
846 int WebContentsImpl::GetFullscreenWidgetRoutingID() const { 860 int WebContentsImpl::GetFullscreenWidgetRoutingID() const {
847 return fullscreen_widget_routing_id_; 861 return fullscreen_widget_routing_id_;
848 } 862 }
(...skipping 2643 matching lines...) Expand 10 before | Expand all | Expand 10 after
3492 3506
3493 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() const { 3507 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() const {
3494 return browser_plugin_guest_.get(); 3508 return browser_plugin_guest_.get();
3495 } 3509 }
3496 3510
3497 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() const { 3511 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() const {
3498 return browser_plugin_embedder_.get(); 3512 return browser_plugin_embedder_.get();
3499 } 3513 }
3500 3514
3501 } // namespace content 3515 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/public/browser/web_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698