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

Side by Side Diff: chrome/browser/tab_contents/tab_util.cc

Issue 9600036: Move Render(View|Widget)Host and associated classes to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to review comments. Created 8 years, 9 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
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 "chrome/browser/tab_contents/tab_util.h" 5 #include "chrome/browser/tab_contents/tab_util.h"
6 6
7 #include "chrome/browser/extensions/extension_service.h" 7 #include "chrome/browser/extensions/extension_service.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" 9 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h"
10 #include "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
11 #include "content/public/browser/render_view_host.h" 11 #include "content/public/browser/render_view_host.h"
12 #include "content/public/browser/render_view_host_delegate.h" 12 #include "content/public/browser/render_view_host_delegate.h"
13 #include "content/public/browser/site_instance.h" 13 #include "content/public/browser/site_instance.h"
14 #include "content/public/browser/web_contents.h" 14 #include "content/public/browser/web_contents.h"
15 #include "googleurl/src/gurl.h" 15 #include "googleurl/src/gurl.h"
16 16
17 using content::RenderViewHost;
17 using content::SiteInstance; 18 using content::SiteInstance;
18 using content::WebContents; 19 using content::WebContents;
19 20
20 namespace tab_util { 21 namespace tab_util {
21 22
22 content::WebContents* GetWebContentsByID(int render_process_id, 23 content::WebContents* GetWebContentsByID(int render_process_id,
23 int render_view_id) { 24 int render_view_id) {
24 RenderViewHost* render_view_host = 25 RenderViewHost* render_view_host =
25 RenderViewHost::FromID(render_process_id, render_view_id); 26 RenderViewHost::FromID(render_process_id, render_view_id);
26 if (!render_view_host) 27 if (!render_view_host)
(...skipping 23 matching lines...) Expand all
50 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kProcessPerTab) && 51 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kProcessPerTab) &&
51 SiteInstance::IsSameWebSite(source_contents->GetBrowserContext(), 52 SiteInstance::IsSameWebSite(source_contents->GetBrowserContext(),
52 source_contents->GetURL(), 53 source_contents->GetURL(),
53 url)) { 54 url)) {
54 return source_contents->GetSiteInstance(); 55 return source_contents->GetSiteInstance();
55 } 56 }
56 return NULL; 57 return NULL;
57 } 58 }
58 59
59 } // namespace tab_util 60 } // namespace tab_util
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/spelling_menu_observer_browsertest.cc ('k') | chrome/browser/tab_contents/thumbnail_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698