| 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);
|
| }
|
|
|