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

Unified Diff: chrome/browser/tab_contents/tab_util.cc

Issue 21388003: Move routing to RenderFrameHost instead of RenderViewHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move global map to .cc file. Created 7 years, 4 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 | « no previous file | content/browser/download/download_request_handle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/tab_util.cc
diff --git a/chrome/browser/tab_contents/tab_util.cc b/chrome/browser/tab_contents/tab_util.cc
index fae1201076d8a0dbfe4a4711f408cdd4ba0375d4..e326f70ca1b0dad753785da7d61d80f5592bb966 100644
--- a/chrome/browser/tab_contents/tab_util.cc
+++ b/chrome/browser/tab_contents/tab_util.cc
@@ -8,11 +8,13 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h"
#include "chrome/common/chrome_switches.h"
+#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/site_instance.h"
#include "content/public/browser/web_contents.h"
#include "url/gurl.h"
+using content::RenderFrameHost;
using content::RenderViewHost;
using content::SiteInstance;
using content::WebContents;
@@ -23,8 +25,15 @@ content::WebContents* GetWebContentsByID(int render_process_id,
int render_view_id) {
RenderViewHost* render_view_host =
RenderViewHost::FromID(render_process_id, render_view_id);
- if (!render_view_host)
- return NULL;
+ if (!render_view_host) {
+ RenderFrameHost* render_frame_host =
+ RenderFrameHost::FromID(render_process_id, render_view_id);
+ if (!render_frame_host)
+ return NULL;
+
+ return WebContents::FromRenderViewHost(
+ render_frame_host->GetRenderViewHost());
+ }
return WebContents::FromRenderViewHost(render_view_host);
}
« no previous file with comments | « no previous file | content/browser/download/download_request_handle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698