summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-18 00:34:30 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-18 00:34:30 +0000
commitf3b1a084a01ab82caf998daefcb989c66ff16135 (patch)
tree1072e46976c2fb7fa82d72c74bdc579d78f0ce01 /chrome
parent8f0633691cd10779408642e2ad5eaa9b0c190b0a (diff)
downloadchromium_src-f3b1a084a01ab82caf998daefcb989c66ff16135.zip
chromium_src-f3b1a084a01ab82caf998daefcb989c66ff16135.tar.gz
chromium_src-f3b1a084a01ab82caf998daefcb989c66ff16135.tar.bz2
Define the public interface for content browser RenderProcessHost. This interface is implemented by the RenderProcessHostImpl class which lives in content\browser\renderer_host\render_process_host_impl.cc/.h. The RenderProcessHostImpl class is a consolidation of the RenderProcessHost and BrowserRenderProcessHost classes.
The RenderProcessHost public interface was created from the now deleted RenderProcessHost class defined in content\browser\renderer_host\render_process_host.h. Additional methods have been added to the interface to ensure that it works correctly with the MockRenderProcessHost class used by unit tests. I had to implement a number of overrides in the MockRenderProcessHost class to ensure that tests work correctly. This was because of assumptions in the tests that the MockRPH class was a real RPH which it was till now. Added a TODO for the methods which could potentially be removed from this interface. Will revisit that in a subsequent CL. BUG=98716 TEST=No change in functionality. Hopefully it all compiles and works. Review URL: http://codereview.chromium.org/8515027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110615 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/app/DEPS2
-rw-r--r--chrome/app/chrome_main_delegate.cc4
-rw-r--r--chrome/browser/automation/automation_provider_observers.cc6
-rw-r--r--chrome/browser/automation/automation_util.cc2
-rw-r--r--chrome/browser/automation/testing_automation_provider.cc6
-rw-r--r--chrome/browser/browser_about_handler.cc5
-rw-r--r--chrome/browser/browser_process_impl.cc5
-rw-r--r--chrome/browser/browser_shutdown.cc5
-rw-r--r--chrome/browser/chrome_content_browser_client.cc66
-rw-r--r--chrome/browser/chrome_content_browser_client.h6
-rw-r--r--chrome/browser/chrome_plugin_message_filter.cc7
-rw-r--r--chrome/browser/chrome_plugin_service_filter.cc4
-rw-r--r--chrome/browser/chromeos/status/memory_menu_button.cc11
-rw-r--r--chrome/browser/debugger/devtools_window.cc2
-rw-r--r--chrome/browser/download/download_extension_api.cc4
-rw-r--r--chrome/browser/extensions/app_process_apitest.cc36
-rw-r--r--chrome/browser/extensions/extension_crash_recovery_browsertest.cc7
-rw-r--r--chrome/browser/extensions/extension_event_router.cc28
-rw-r--r--chrome/browser/extensions/extension_event_router.h7
-rw-r--r--chrome/browser/extensions/extension_file_browser_private_api.cc10
-rw-r--r--chrome/browser/extensions/extension_function.cc4
-rw-r--r--chrome/browser/extensions/extension_function_dispatcher.cc4
-rw-r--r--chrome/browser/extensions/extension_host.cc5
-rw-r--r--chrome/browser/extensions/extension_host.h7
-rw-r--r--chrome/browser/extensions/extension_message_handler.cc4
-rw-r--r--chrome/browser/extensions/extension_message_service.cc18
-rw-r--r--chrome/browser/extensions/extension_permissions_api.cc7
-rw-r--r--chrome/browser/extensions/extension_permissions_api.h2
-rw-r--r--chrome/browser/extensions/extension_processes_api.cc2
-rw-r--r--chrome/browser/extensions/extension_save_page_api.cc2
-rw-r--r--chrome/browser/extensions/extension_service.cc34
-rw-r--r--chrome/browser/extensions/extension_tab_helper.cc4
-rw-r--r--chrome/browser/extensions/extension_tab_id_map.cc8
-rw-r--r--chrome/browser/extensions/extension_webrequest_api.cc11
-rw-r--r--chrome/browser/extensions/extension_webrequest_api.h7
-rw-r--r--chrome/browser/extensions/isolated_app_browsertest.cc16
-rw-r--r--chrome/browser/extensions/user_script_master.cc15
-rw-r--r--chrome/browser/extensions/user_script_master.h7
-rw-r--r--chrome/browser/external_tab_container_win.cc6
-rw-r--r--chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc6
-rw-r--r--chrome/browser/memory_details.cc22
-rw-r--r--chrome/browser/memory_purger.cc7
-rw-r--r--chrome/browser/memory_purger.h4
-rw-r--r--chrome/browser/metrics/field_trial_synchronizer.cc5
-rw-r--r--chrome/browser/metrics/histogram_synchronizer.cc8
-rw-r--r--chrome/browser/metrics/metrics_service.cc22
-rw-r--r--chrome/browser/metrics/metrics_service.h7
-rw-r--r--chrome/browser/metrics/tracking_synchronizer.cc15
-rw-r--r--chrome/browser/notifications/balloon_host.cc2
-rw-r--r--chrome/browser/oom_priority_manager.cc9
-rw-r--r--chrome/browser/pdf_unsupported_feature.cc4
-rw-r--r--chrome/browser/prefs/browser_prefs.cc2
-rw-r--r--chrome/browser/prerender/prerender_contents.cc2
-rw-r--r--chrome/browser/prerender/prerender_manager.cc14
-rw-r--r--chrome/browser/printing/background_printing_manager.cc19
-rw-r--r--chrome/browser/printing/background_printing_manager.h7
-rw-r--r--chrome/browser/printing/print_preview_tab_controller.cc21
-rw-r--r--chrome/browser/printing/print_preview_tab_controller.h4
-rw-r--r--chrome/browser/profiles/profile_impl.cc14
-rw-r--r--chrome/browser/renderer_host/chrome_render_message_filter.cc10
-rw-r--r--chrome/browser/renderer_host/chrome_render_view_host_observer.cc10
-rw-r--r--chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc9
-rw-r--r--chrome/browser/renderer_host/web_cache_manager.cc20
-rw-r--r--chrome/browser/renderer_host/web_cache_manager_browsertest.cc2
-rw-r--r--chrome/browser/safe_browsing/client_side_detection_host.cc6
-rw-r--r--chrome/browser/safe_browsing/client_side_detection_host_unittest.cc7
-rw-r--r--chrome/browser/safe_browsing/client_side_detection_service.cc12
-rw-r--r--chrome/browser/safe_browsing/client_side_detection_service.h7
-rw-r--r--chrome/browser/safe_browsing/malware_details_unittest.cc3
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc3
-rw-r--r--chrome/browser/search_engines/search_provider_install_state_message_filter.cc9
-rw-r--r--chrome/browser/sidebar/sidebar_container.cc2
-rw-r--r--chrome/browser/spellchecker/spellcheck_host.h7
-rw-r--r--chrome/browser/spellchecker/spellcheck_host_impl.cc17
-rw-r--r--chrome/browser/spellchecker/spellcheck_host_impl.h2
-rw-r--r--chrome/browser/spellchecker/spellcheck_message_filter.cc12
-rw-r--r--chrome/browser/spellchecker/spellcheck_profile_unittest.cc2
-rw-r--r--chrome/browser/ssl/ssl_blocking_page.cc2
-rw-r--r--chrome/browser/tab_contents/render_view_host_delegate_helper.cc13
-rw-r--r--chrome/browser/tab_contents/render_view_host_delegate_helper.h6
-rw-r--r--chrome/browser/tabs/tab_strip_model.cc10
-rw-r--r--chrome/browser/tabs/tab_strip_model_unittest.cc4
-rw-r--r--chrome/browser/task_manager/task_manager_notification_resource_provider.cc2
-rw-r--r--chrome/browser/task_manager/task_manager_resource_providers.cc8
-rw-r--r--chrome/browser/translate/translate_manager.cc5
-rw-r--r--chrome/browser/ui/browser.cc2
-rw-r--r--chrome/browser/ui/browser_browsertest.cc26
-rw-r--r--chrome/browser/ui/browser_list.cc5
-rw-r--r--chrome/browser/ui/cocoa/hung_renderer_controller.mm2
-rw-r--r--chrome/browser/ui/gtk/hung_renderer_dialog_gtk.cc2
-rw-r--r--chrome/browser/ui/tab_contents/tab_contents_wrapper.cc2
-rw-r--r--chrome/browser/ui/views/hung_renderer_view.cc6
-rw-r--r--chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc2
-rw-r--r--chrome/browser/ui/webui/media/media_internals_proxy.cc7
-rw-r--r--chrome/browser/ui/webui/ntp/new_tab_ui_browsertest.cc2
-rw-r--r--chrome/browser/ui/webui/options/extension_settings_handler.cc6
-rw-r--r--chrome/browser/visitedlink/visitedlink_event_listener.cc39
-rw-r--r--chrome/browser/visitedlink/visitedlink_unittest.cc18
-rw-r--r--chrome/test/base/in_process_browser_test.cc4
-rw-r--r--chrome/test/base/ui_test_utils.cc6
100 files changed, 496 insertions, 403 deletions
diff --git a/chrome/app/DEPS b/chrome/app/DEPS
index d9f9aee..414df54 100644
--- a/chrome/app/DEPS
+++ b/chrome/app/DEPS
@@ -7,7 +7,7 @@ include_rules = [
"+chrome/utility/chrome_content_utility_client.h",
"+content/app", # TODO(joi): Remove once content API in place.
"+content/public/app",
- "+content/browser/renderer_host/render_process_host.h",
+ "+content/public/browser/render_process_host.h",
"+grit", # For generated headers
"+media/base", # For initializing media library.
"+policy", # For generated headers and source
diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc
index 618b894..380e0553 100644
--- a/chrome/app/chrome_main_delegate.cc
+++ b/chrome/app/chrome_main_delegate.cc
@@ -30,9 +30,9 @@
#include "chrome/renderer/chrome_content_renderer_client.h"
#include "chrome/utility/chrome_content_utility_client.h"
#include "content/app/content_main.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/common/content_counters.h"
#include "content/public/app/content_main_delegate.h"
+#include "content/public/browser/render_process_host.h"
#include "content/public/common/content_client.h"
#include "content/public/common/content_paths.h"
#include "content/public/common/content_switches.h"
@@ -570,7 +570,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
// don't enable it for official Chrome builds.
#if !defined(GOOGLE_CHROME_BUILD)
if (command_line.HasSwitch(switches::kSingleProcess)) {
- RenderProcessHost::set_run_renderer_in_process(true);
+ content::RenderProcessHost::set_run_renderer_in_process(true);
#if defined(OS_MACOSX)
// TODO(port-mac): This is from renderer_main_platform_delegate.cc.
// shess tried to refactor things appropriately, but it sprawled out
diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc
index aa0fe0b..e9200cf 100644
--- a/chrome/browser/automation/automation_provider_observers.cc
+++ b/chrome/browser/automation/automation_provider_observers.cc
@@ -73,12 +73,12 @@
#include "chrome/common/content_settings_types.h"
#include "chrome/common/extensions/extension.h"
#include "content/browser/download/save_package.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/common/child_process_info.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/render_process_host.h"
#include "googleurl/src/gurl.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/codec/png_codec.h"
@@ -143,8 +143,8 @@ void InitialLoadObserver::Observe(int type,
}
} else if (type == content::NOTIFICATION_RENDERER_PROCESS_CLOSED) {
base::TerminationStatus status =
- content::Details<RenderProcessHost::RendererClosedDetails>(details)->
- status;
+ content::Details<content::RenderProcessHost::RendererClosedDetails>(
+ details)->status;
switch (status) {
case base::TERMINATION_STATUS_NORMAL_TERMINATION:
break;
diff --git a/chrome/browser/automation/automation_util.cc b/chrome/browser/automation/automation_util.cc
index 4d53ef5..079b940 100644
--- a/chrome/browser/automation/automation_util.cc
+++ b/chrome/browser/automation/automation_util.cc
@@ -139,7 +139,7 @@ net::URLRequestContextGetter* GetRequestContext(TabContents* contents) {
// Since we may be on the UI thread don't call GetURLRequestContext().
// Get the request context specific to the current TabContents and app.
return contents->browser_context()->GetRequestContextForRenderProcess(
- contents->render_view_host()->process()->id());
+ contents->render_view_host()->process()->GetID());
}
void GetCookies(const GURL& url,
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index a3ee268..d47a5ec 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -111,10 +111,10 @@
#include "chrome/common/render_messages.h"
#include "chrome/common/url_constants.h"
#include "content/browser/plugin_service.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/interstitial_page.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/render_process_host.h"
#include "content/public/common/common_param_traits.h"
#include "net/base/cookie_store.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
@@ -1258,7 +1258,7 @@ void TestingAutomationProvider::GetTabProcessID(int handle, int* process_id) {
*process_id = 0;
TabContents* tab_contents =
tab_tracker_->GetResource(handle)->tab_contents();
- RenderProcessHost* rph = tab_contents->GetRenderProcessHost();
+ content::RenderProcessHost* rph = tab_contents->GetRenderProcessHost();
if (rph)
*process_id = base::GetProcId(rph->GetHandle());
}
@@ -2881,7 +2881,7 @@ void TestingAutomationProvider::GetBrowserInfo(
DictionaryValue* view = new DictionaryValue;
view->SetInteger(
"render_process_id",
- ex_host->render_process_host()->id());
+ ex_host->render_process_host()->GetID());
view->SetInteger(
"render_view_id",
ex_host->render_view_host()->routing_id());
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc
index ab38114..a852671 100644
--- a/chrome/browser/browser_about_handler.cc
+++ b/chrome/browser/browser_about_handler.cc
@@ -47,11 +47,11 @@
#include "chrome/common/url_constants.h"
#include "content/browser/gpu/gpu_process_host.h"
#include "content/browser/plugin_service.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/sensors/sensors_provider.h"
#include "content/common/gpu/gpu_messages.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/render_process_host.h"
#include "content/public/common/content_client.h"
#include "crypto/nss_util.h"
#include "googleurl/src/gurl.h"
@@ -832,7 +832,8 @@ std::string AboutTcmalloc() {
MallocExtension::instance()->GetStats(buffer, sizeof(buffer));
std::string browser("Browser");
AboutTcmallocOutputs::GetInstance()->SetOutput(browser, buffer);
- RenderProcessHost::iterator it(RenderProcessHost::AllHostsIterator());
+ content::RenderProcessHost::iterator
+ it(content::RenderProcessHost::AllHostsIterator());
while (!it.IsAtEnd()) {
it.GetCurrentValue()->Send(new ChromeViewMsg_GetRendererTcmalloc);
it.Advance();
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index baf12d0..06d5c19 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -79,10 +79,10 @@
#include "content/browser/gpu/gpu_process_host_ui_shim.h"
#include "content/browser/net/browser_online_state_observer.h"
#include "content/browser/plugin_service.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_details.h"
+#include "content/public/browser/render_process_host.h"
#include "content/public/common/url_fetcher.h"
#include "ipc/ipc_logging.h"
#include "net/socket/client_socket_pool_manager.h"
@@ -1082,7 +1082,8 @@ void BrowserProcessImpl::SetIPCLoggingEnabled(bool enable) {
// Finally, tell the renderers which don't derive from ChildProcess.
// Messages to the renderers must be done on the UI (main) thread.
- for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator());
+ for (content::RenderProcessHost::iterator i(
+ content::RenderProcessHost::AllHostsIterator());
!i.IsAtEnd(); i.Advance())
i.GetCurrentValue()->Send(new ChildProcessMsg_SetIPCLoggingEnabled(enable));
}
diff --git a/chrome/browser/browser_shutdown.cc b/chrome/browser/browser_shutdown.cc
index 64a3a06..5aa4b66 100644
--- a/chrome/browser/browser_shutdown.cc
+++ b/chrome/browser/browser_shutdown.cc
@@ -35,10 +35,10 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/switch_utils.h"
#include "content/browser/plugin_process_host.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_widget_host.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/render_process_host.h"
#include "ui/base/resource/resource_bundle.h"
#if defined(OS_WIN)
@@ -99,7 +99,8 @@ void OnShutdownStarting(ShutdownType type) {
// shutdown path for the ones that didn't exit here.
shutdown_num_processes_ = 0;
shutdown_num_processes_slow_ = 0;
- for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator());
+ for (content::RenderProcessHost::iterator i(
+ content::RenderProcessHost::AllHostsIterator());
!i.IsAtEnd(); i.Advance()) {
++shutdown_num_processes_;
if (!i.GetCurrentValue()->FastShutdownIfPossible())
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 46a9e2f..f651aed 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -63,7 +63,6 @@
#include "content/browser/browser_url_handler.h"
#include "content/browser/browsing_instance.h"
#include "content/browser/plugin_process_host.h"
-#include "content/browser/renderer_host/browser_render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/resource_context.h"
#include "content/browser/site_instance.h"
@@ -73,6 +72,7 @@
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/browser/worker_host/worker_process_host.h"
#include "content/public/browser/browser_main_parts.h"
+#include "content/public/browser/render_process_host.h"
#include "grit/generated_resources.h"
#include "grit/ui_resources.h"
#include "net/base/cookie_monster.h"
@@ -195,13 +195,13 @@ RenderProcessHostPrivilege GetPrivilegeRequiredByUrl(
}
RenderProcessHostPrivilege GetProcessPrivilege(
- RenderProcessHost* process_host,
+ content::RenderProcessHost* process_host,
extensions::ProcessMap* process_map,
ExtensionService* service) {
// TODO(aa): It seems like hosted apps should be grouped separately from
// extensions: crbug.com/102533.
std::set<std::string> extension_ids =
- process_map->GetExtensionsInProcess(process_host->id());
+ process_map->GetExtensionsInProcess(process_host->GetID());
if (extension_ids.empty())
return PRIV_NORMAL;
@@ -303,18 +303,18 @@ void ChromeContentBrowserClient::RenderViewHostCreated(
new ExtensionMessageHandler(render_view_host);
}
-void ChromeContentBrowserClient::BrowserRenderProcessHostCreated(
- BrowserRenderProcessHost* host) {
- int id = host->id();
- Profile* profile = Profile::FromBrowserContext(host->browser_context());
- host->channel()->AddFilter(new ChromeRenderMessageFilter(
+void ChromeContentBrowserClient::RenderProcessHostCreated(
+ content::RenderProcessHost* host) {
+ int id = host->GetID();
+ Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext());
+ host->GetChannel()->AddFilter(new ChromeRenderMessageFilter(
id, profile, profile->GetRequestContextForRenderProcess(id)));
- host->channel()->AddFilter(new PluginInfoMessageFilter(id, profile));
- host->channel()->AddFilter(new PrintingMessageFilter());
- host->channel()->AddFilter(
+ host->GetChannel()->AddFilter(new PluginInfoMessageFilter(id, profile));
+ host->GetChannel()->AddFilter(new PrintingMessageFilter());
+ host->GetChannel()->AddFilter(
new SearchProviderInstallStateMessageFilter(id, profile));
- host->channel()->AddFilter(new SpellCheckMessageFilter(id));
- host->channel()->AddFilter(new ChromeBenchmarkingMessageFilter(
+ host->GetChannel()->AddFilter(new SpellCheckMessageFilter(id));
+ host->GetChannel()->AddFilter(new ChromeBenchmarkingMessageFilter(
id, profile, profile->GetRequestContextForRenderProcess(id)));
host->Send(new ChromeViewMsg_SetIsIncognitoProcess(
@@ -396,10 +396,10 @@ bool ChromeContentBrowserClient::IsURLSameAsAnySiteInstance(const GURL& url) {
}
bool ChromeContentBrowserClient::IsSuitableHost(
- RenderProcessHost* process_host,
+ content::RenderProcessHost* process_host,
const GURL& site_url) {
Profile* profile =
- Profile::FromBrowserContext(process_host->browser_context());
+ Profile::FromBrowserContext(process_host->GetBrowserContext());
ExtensionService* service = profile->GetExtensionService();
extensions::ProcessMap* process_map = service->process_map();
@@ -448,13 +448,13 @@ void ChromeContentBrowserClient::SiteInstanceGotProcess(
return;
service->process_map()->Insert(
- extension->id(), site_instance->GetProcess()->id());
+ extension->id(), site_instance->GetProcess()->GetID());
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(&ExtensionInfoMap::RegisterExtensionProcess,
profile->GetExtensionInfoMap(),
extension->id(),
- site_instance->GetProcess()->id()));
+ site_instance->GetProcess()->GetID()));
}
void ChromeContentBrowserClient::SiteInstanceDeleting(
@@ -476,13 +476,13 @@ void ChromeContentBrowserClient::SiteInstanceDeleting(
return;
service->process_map()->Remove(
- extension->id(), site_instance->GetProcess()->id());
+ extension->id(), site_instance->GetProcess()->GetID());
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(&ExtensionInfoMap::UnregisterExtensionProcess,
profile->GetExtensionInfoMap(),
extension->id(),
- site_instance->GetProcess()->id()));
+ site_instance->GetProcess()->GetID()));
}
bool ChromeContentBrowserClient::ShouldSwapProcessesForNavigation(
@@ -546,12 +546,14 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
command_line->AppendSwitchASCII(switches::kLoginProfile, login_profile);
#endif
- RenderProcessHost* process = RenderProcessHost::FromID(child_process_id);
+ content::RenderProcessHost* process =
+ content::RenderProcessHost::FromID(child_process_id);
- Profile* profile = Profile::FromBrowserContext(process->browser_context());
+ Profile* profile = Profile::FromBrowserContext(
+ process->GetBrowserContext());
extensions::ProcessMap* process_map =
profile->GetExtensionService()->process_map();
- if (process_map && process_map->Contains(process->id()))
+ if (process_map && process_map->Contains(process->GetID()))
command_line->AppendSwitch(switches::kExtensionProcess);
PrefService* prefs = profile->GetPrefs();
@@ -893,8 +895,8 @@ void ChromeContentBrowserClient::RequestDesktopNotificationPermission(
return;
}
- RenderProcessHost* process = rvh->process();
- Profile* profile = Profile::FromBrowserContext(process->browser_context());
+ content::RenderProcessHost* process = rvh->process();
+ Profile* profile = Profile::FromBrowserContext(process->GetBrowserContext());
DesktopNotificationService* service =
DesktopNotificationServiceFactory::GetForProfile(profile);
service->RequestPermission(
@@ -935,8 +937,8 @@ void ChromeContentBrowserClient::ShowDesktopNotification(
return;
}
- RenderProcessHost* process = rvh->process();
- Profile* profile = Profile::FromBrowserContext(process->browser_context());
+ content::RenderProcessHost* process = rvh->process();
+ Profile* profile = Profile::FromBrowserContext(process->GetBrowserContext());
DesktopNotificationService* service =
DesktopNotificationServiceFactory::GetForProfile(profile);
service->ShowDesktopNotification(
@@ -956,8 +958,8 @@ void ChromeContentBrowserClient::CancelDesktopNotification(
return;
}
- RenderProcessHost* process = rvh->process();
- Profile* profile = Profile::FromBrowserContext(process->browser_context());
+ content::RenderProcessHost* process = rvh->process();
+ Profile* profile = Profile::FromBrowserContext(process->GetBrowserContext());
DesktopNotificationService* service =
DesktopNotificationServiceFactory::GetForProfile(profile);
service->CancelDesktopNotification(
@@ -1036,12 +1038,12 @@ WebPreferences ChromeContentBrowserClient::GetWebkitPrefs(RenderViewHost* rvh) {
void ChromeContentBrowserClient::UpdateInspectorSetting(
RenderViewHost* rvh, const std::string& key, const std::string& value) {
RenderViewHostDelegateHelper::UpdateInspectorSetting(
- rvh->process()->browser_context(), key, value);
+ rvh->process()->GetBrowserContext(), key, value);
}
void ChromeContentBrowserClient::ClearInspectorSettings(RenderViewHost* rvh) {
RenderViewHostDelegateHelper::ClearInspectorSettings(
- rvh->process()->browser_context());
+ rvh->process()->GetBrowserContext());
}
void ChromeContentBrowserClient::BrowserURLHandlerCreated(
@@ -1062,7 +1064,7 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
void ChromeContentBrowserClient::ClearCache(RenderViewHost* rvh) {
Profile* profile = Profile::FromBrowserContext(
- rvh->site_instance()->GetProcess()->browser_context());
+ rvh->site_instance()->GetProcess()->GetBrowserContext());
BrowsingDataRemover* remover = new BrowsingDataRemover(profile,
BrowsingDataRemover::EVERYTHING,
base::Time());
@@ -1072,7 +1074,7 @@ void ChromeContentBrowserClient::ClearCache(RenderViewHost* rvh) {
void ChromeContentBrowserClient::ClearCookies(RenderViewHost* rvh) {
Profile* profile = Profile::FromBrowserContext(
- rvh->site_instance()->GetProcess()->browser_context());
+ rvh->site_instance()->GetProcess()->GetBrowserContext());
BrowsingDataRemover* remover = new BrowsingDataRemover(profile,
BrowsingDataRemover::EVERYTHING,
base::Time());
diff --git a/chrome/browser/chrome_content_browser_client.h b/chrome/browser/chrome_content_browser_client.h
index 50aed5d..5f49963 100644
--- a/chrome/browser/chrome_content_browser_client.h
+++ b/chrome/browser/chrome_content_browser_client.h
@@ -23,8 +23,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
virtual TabContentsView* CreateTabContentsView(
TabContents* tab_contents) OVERRIDE;
virtual void RenderViewHostCreated(RenderViewHost* render_view_host) OVERRIDE;
- virtual void BrowserRenderProcessHostCreated(
- BrowserRenderProcessHost* host) OVERRIDE;
+ virtual void RenderProcessHostCreated(
+ content::RenderProcessHost* host) OVERRIDE;
virtual void PluginProcessHostCreated(PluginProcessHost* host) OVERRIDE;
virtual content::WebUIFactory* GetWebUIFactory() OVERRIDE;
virtual bool ShouldUseProcessPerSite(content::BrowserContext* browser_context,
@@ -32,7 +32,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
virtual GURL GetEffectiveURL(content::BrowserContext* browser_context,
const GURL& url) OVERRIDE;
virtual bool IsURLSameAsAnySiteInstance(const GURL& url) OVERRIDE;
- virtual bool IsSuitableHost(RenderProcessHost* process_host,
+ virtual bool IsSuitableHost(content::RenderProcessHost* process_host,
const GURL& url) OVERRIDE;
virtual void SiteInstanceGotProcess(SiteInstance* site_instance) OVERRIDE;
virtual void SiteInstanceDeleting(SiteInstance* site_instance) OVERRIDE;
diff --git a/chrome/browser/chrome_plugin_message_filter.cc b/chrome/browser/chrome_plugin_message_filter.cc
index 7c0c2da..fee4c01 100644
--- a/chrome/browser/chrome_plugin_message_filter.cc
+++ b/chrome/browser/chrome_plugin_message_filter.cc
@@ -13,10 +13,10 @@
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/chrome_plugin_messages.h"
#include "content/browser/plugin_process_host.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_view_host_delegate.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/render_process_host.h"
#include "net/url_request/url_request_context_getter.h"
#include "webkit/plugins/npapi/default_plugin_shared.h"
@@ -71,7 +71,8 @@ void ChromePluginMessageFilter::OnDownloadUrlOnUIThread(
const std::string& url,
gfx::NativeWindow caller_window,
int render_process_id) {
- RenderProcessHost* host = RenderProcessHost::FromID(render_process_id);
+ content::RenderProcessHost* host =
+ content::RenderProcessHost::FromID(render_process_id);
if (!host) {
return;
}
@@ -79,7 +80,7 @@ void ChromePluginMessageFilter::OnDownloadUrlOnUIThread(
BrowserThread::FILE, FROM_HERE,
base::Bind(&ChromePluginMessageFilter::OnDownloadUrlOnFileThread,
url, caller_window,
- host->browser_context()->GetRequestContext()));
+ host->GetBrowserContext()->GetRequestContext()));
}
void ChromePluginMessageFilter::OnDownloadUrlOnFileThread(
diff --git a/chrome/browser/chrome_plugin_service_filter.cc b/chrome/browser/chrome_plugin_service_filter.cc
index 29b3c40..51d26df 100644
--- a/chrome/browser/chrome_plugin_service_filter.cc
+++ b/chrome/browser/chrome_plugin_service_filter.cc
@@ -10,10 +10,10 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/plugin_service.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/resource_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/render_process_host.h"
#include "webkit/plugins/npapi/plugin_group.h"
#include "webkit/plugins/npapi/plugin_list.h"
@@ -142,7 +142,7 @@ void ChromePluginServiceFilter::Observe(
switch (type) {
case content::NOTIFICATION_RENDERER_PROCESS_CLOSED: {
int render_process_id =
- content::Source<RenderProcessHost>(source).ptr()->id();
+ content::Source<content::RenderProcessHost>(source).ptr()->GetID();
base::AutoLock auto_lock(lock_);
for (size_t i = 0; i < overridden_plugins_.size(); ++i) {
diff --git a/chrome/browser/chromeos/status/memory_menu_button.cc b/chrome/browser/chromeos/status/memory_menu_button.cc
index f7504d6..ee90e78 100644
--- a/chrome/browser/chromeos/status/memory_menu_button.cc
+++ b/chrome/browser/chromeos/status/memory_menu_button.cc
@@ -15,9 +15,9 @@
#include "chrome/browser/chromeos/view_ids.h"
#include "chrome/browser/memory_purger.h"
#include "chrome/common/render_messages.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/render_process_host.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
#include "views/controls/menu/menu_runner.h"
@@ -160,7 +160,8 @@ void MemoryMenuButton::SendCommandToRenderers(int id) {
// Use the "is running" value for this process to determine whether to
// start or stop profiling on the renderer processes.
bool started = IsHeapProfilerRunning();
- for (RenderProcessHost::iterator it = RenderProcessHost::AllHostsIterator();
+ for (content::RenderProcessHost::iterator it =
+ content::RenderProcessHost::AllHostsIterator();
!it.IsAtEnd(); it.Advance()) {
switch (id) {
case TOGGLE_PROFILING_ITEM:
@@ -262,9 +263,9 @@ void MemoryMenuButton::Observe(int type,
const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_RENDERER_PROCESS_CLOSED: {
- RenderProcessHost::RendererClosedDetails* process_details =
- content::Details<RenderProcessHost::RendererClosedDetails>(details).
- ptr();
+ content::RenderProcessHost::RendererClosedDetails* process_details =
+ content::Details<content::RenderProcessHost::RendererClosedDetails>(
+ details).ptr();
if (process_details->status ==
base::TERMINATION_STATUS_PROCESS_WAS_KILLED) {
renderer_kills_++;
diff --git a/chrome/browser/debugger/devtools_window.cc b/chrome/browser/debugger/devtools_window.cc
index 0377e35..1df3ee7 100644
--- a/chrome/browser/debugger/devtools_window.cc
+++ b/chrome/browser/debugger/devtools_window.cc
@@ -626,7 +626,7 @@ DevToolsWindow* DevToolsWindow::ToggleDevToolsWindow(
bool do_open = force_open;
if (!window) {
Profile* profile = Profile::FromBrowserContext(
- inspected_rvh->process()->browser_context());
+ inspected_rvh->process()->GetBrowserContext());
bool docked = profile->GetPrefs()->GetBoolean(prefs::kDevToolsOpenDocked);
window = Create(profile, inspected_rvh, docked, false);
manager->RegisterDevToolsClientHostFor(inspected_rvh, window);
diff --git a/chrome/browser/download/download_extension_api.cc b/chrome/browser/download/download_extension_api.cc
index 79de935..9629c63 100644
--- a/chrome/browser/download/download_extension_api.cc
+++ b/chrome/browser/download/download_extension_api.cc
@@ -35,9 +35,9 @@
#include "content/browser/download/download_state_info.h"
#include "content/browser/download/download_types.h"
#include "content/browser/download/interrupt_reasons.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
+#include "content/public/browser/render_process_host.h"
#include "net/http/http_util.h"
#include "net/url_request/url_request.h"
@@ -220,7 +220,7 @@ bool DownloadsDownloadFunction::ParseArgs() {
}
iodata_->rdh = g_browser_process->resource_dispatcher_host();
iodata_->resource_context = &profile()->GetResourceContext();
- iodata_->render_process_host_id = render_view_host()->process()->id();
+ iodata_->render_process_host_id = render_view_host()->process()->GetID();
iodata_->render_view_host_routing_id = render_view_host()->routing_id();
return true;
}
diff --git a/chrome/browser/extensions/app_process_apitest.cc b/chrome/browser/extensions/app_process_apitest.cc
index 75f57b5..05be15b 100644
--- a/chrome/browser/extensions/app_process_apitest.cc
+++ b/chrome/browser/extensions/app_process_apitest.cc
@@ -105,7 +105,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, AppProcess) {
browser(), base_url.Resolve("path1/empty.html"), NEW_FOREGROUND_TAB,
ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
EXPECT_TRUE(process_map->Contains(
- browser()->GetTabContentsAt(1)->render_view_host()->process()->id()));
+ browser()->GetTabContentsAt(1)->render_view_host()->process()->GetID()));
EXPECT_FALSE(browser()->GetTabContentsAt(1)->web_ui());
LOG(INFO) << "Nav 1.";
@@ -113,7 +113,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, AppProcess) {
browser(), base_url.Resolve("path2/empty.html"), NEW_FOREGROUND_TAB,
ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
EXPECT_TRUE(process_map->Contains(
- browser()->GetTabContentsAt(2)->render_view_host()->process()->id()));
+ browser()->GetTabContentsAt(2)->render_view_host()->process()->GetID()));
EXPECT_FALSE(browser()->GetTabContentsAt(2)->web_ui());
LOG(INFO) << "Nav 2.";
@@ -126,7 +126,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, AppProcess) {
ui_test_utils::NavigateToURL(browser(), base_url.Resolve("path3/empty.html"));
LOG(INFO) << "Nav 3.";
EXPECT_FALSE(process_map->Contains(
- browser()->GetTabContentsAt(3)->render_view_host()->process()->id()));
+ browser()->GetTabContentsAt(3)->render_view_host()->process()->GetID()));
EXPECT_FALSE(browser()->GetTabContentsAt(3)->web_ui());
// We should have opened 3 new extension tabs. Including the original blank
@@ -217,7 +217,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, AppProcessInstances) {
ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
LOG(INFO) << "Nav 1.";
EXPECT_TRUE(process_map->Contains(
- browser()->GetTabContentsAt(1)->render_view_host()->process()->id()));
+ browser()->GetTabContentsAt(1)->render_view_host()->process()->GetID()));
EXPECT_FALSE(browser()->GetTabContentsAt(1)->web_ui());
ui_test_utils::WindowedNotificationObserver tab_added_observer(
@@ -229,7 +229,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, AppProcessInstances) {
ui_test_utils::NavigateToURL(browser(), base_url.Resolve("path2/empty.html"));
LOG(INFO) << "Nav 2.";
EXPECT_TRUE(process_map->Contains(
- browser()->GetTabContentsAt(2)->render_view_host()->process()->id()));
+ browser()->GetTabContentsAt(2)->render_view_host()->process()->GetID()));
EXPECT_FALSE(browser()->GetTabContentsAt(2)->web_ui());
// We should have opened 2 new extension tabs. Including the original blank
@@ -308,7 +308,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, DISABLED_ReloadIntoAppProcess) {
ui_test_utils::NavigateToURL(browser(), base_url.Resolve("path1/empty.html"));
TabContents* contents = browser()->GetTabContentsAt(0);
EXPECT_FALSE(process_map->Contains(
- contents->render_view_host()->process()->id()));
+ contents->render_view_host()->process()->GetID()));
// Load app and navigate to the page.
const Extension* app =
@@ -316,13 +316,13 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, DISABLED_ReloadIntoAppProcess) {
ASSERT_TRUE(app);
ui_test_utils::NavigateToURL(browser(), base_url.Resolve("path1/empty.html"));
EXPECT_TRUE(process_map->Contains(
- contents->render_view_host()->process()->id()));
+ contents->render_view_host()->process()->GetID()));
// Disable app and navigate to the page.
DisableExtension(app->id());
ui_test_utils::NavigateToURL(browser(), base_url.Resolve("path1/empty.html"));
EXPECT_FALSE(process_map->Contains(
- contents->render_view_host()->process()->id()));
+ contents->render_view_host()->process()->GetID()));
// Enable app and reload the page.
EnableExtension(app->id());
@@ -333,7 +333,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, DISABLED_ReloadIntoAppProcess) {
browser()->Reload(CURRENT_TAB);
reload_observer.Wait();
EXPECT_TRUE(process_map->Contains(
- contents->render_view_host()->process()->id()));
+ contents->render_view_host()->process()->GetID()));
// Disable app and reload the page.
DisableExtension(app->id());
@@ -344,7 +344,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, DISABLED_ReloadIntoAppProcess) {
browser()->Reload(CURRENT_TAB);
reload_observer2.Wait();
EXPECT_FALSE(process_map->Contains(
- contents->render_view_host()->process()->id()));
+ contents->render_view_host()->process()->GetID()));
// Enable app and reload via JavaScript.
EnableExtension(app->id());
@@ -356,7 +356,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, DISABLED_ReloadIntoAppProcess) {
L"", L"location.reload();"));
js_reload_observer.Wait();
EXPECT_TRUE(process_map->Contains(
- contents->render_view_host()->process()->id()));
+ contents->render_view_host()->process()->GetID()));
// Disable app and reload via JavaScript.
DisableExtension(app->id());
@@ -368,7 +368,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, DISABLED_ReloadIntoAppProcess) {
L"", L"location.reload();"));
js_reload_observer2.Wait();
EXPECT_FALSE(process_map->Contains(
- contents->render_view_host()->process()->id()));
+ contents->render_view_host()->process()->GetID()));
}
// Tests that if we have a non-app process (path3/container.html) that has an
@@ -399,7 +399,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, OpenAppFromIframe) {
ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION |
ui_test_utils::BROWSER_TEST_WAIT_FOR_BROWSER);
EXPECT_FALSE(process_map->Contains(
- browser()->GetTabContentsAt(0)->render_view_host()->process()->id()));
+ browser()->GetTabContentsAt(0)->render_view_host()->process()->GetID()));
// Wait for popup window to appear.
GURL app_url = base_url.Resolve("path1/empty.html");
@@ -422,7 +422,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, OpenAppFromIframe) {
// Popup window should be in the app's process.
EXPECT_TRUE(process_map->Contains(
last_active_browser->GetTabContentsAt(0)->render_view_host()->process()->
- id()));
+ GetID()));
}
// Tests that if we have an app process (path1/container.html) with a non-app
@@ -457,9 +457,9 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, OpenWebPopupFromWebIframe) {
CURRENT_TAB,
ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION |
ui_test_utils::BROWSER_TEST_WAIT_FOR_BROWSER);
- RenderProcessHost* process =
+ content::RenderProcessHost* process =
browser()->GetTabContentsAt(0)->render_view_host()->process();
- EXPECT_TRUE(process_map->Contains(process->id()));
+ EXPECT_TRUE(process_map->Contains(process->GetID()));
// Wait for popup window to appear. The new Browser may not have been
// added with SetLastActive, in which case we need to show it first.
@@ -479,7 +479,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, OpenWebPopupFromWebIframe) {
observer.Wait();
// Popup window should be in the app's process.
- RenderProcessHost* popup_process =
+ content::RenderProcessHost* popup_process =
last_active_browser->GetTabContentsAt(0)->render_view_host()->process();
EXPECT_EQ(process, popup_process);
}
@@ -499,7 +499,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, ReloadAppAfterCrash) {
ui_test_utils::NavigateToURL(browser(), base_url.Resolve("path1/empty.html"));
TabContents* contents = browser()->GetTabContentsAt(0);
EXPECT_TRUE(process_map->Contains(
- contents->render_view_host()->process()->id()));
+ contents->render_view_host()->process()->GetID()));
bool is_installed = false;
ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
contents->render_view_host(), L"",
diff --git a/chrome/browser/extensions/extension_crash_recovery_browsertest.cc b/chrome/browser/extensions/extension_crash_recovery_browsertest.cc
index 83f032f..bca31e4 100644
--- a/chrome/browser/extensions/extension_crash_recovery_browsertest.cc
+++ b/chrome/browser/extensions/extension_crash_recovery_browsertest.cc
@@ -17,9 +17,9 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/test/base/ui_test_utils.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/render_process_host.h"
#include "content/public/common/result_codes.h"
class ExtensionCrashRecoveryTest : public ExtensionBrowserTest {
@@ -72,7 +72,7 @@ class ExtensionCrashRecoveryTest : public ExtensionBrowserTest {
GetBackgroundHostForExtension(extension_id);
ASSERT_TRUE(extension_host);
- RenderProcessHost* extension_rph =
+ content::RenderProcessHost* extension_rph =
extension_host->render_view_host()->process();
base::KillProcess(extension_rph->GetHandle(), content::RESULT_CODE_KILLED,
false);
@@ -94,7 +94,8 @@ class ExtensionCrashRecoveryTest : public ExtensionBrowserTest {
extensions::ProcessMap* process_map =
browser()->profile()->GetExtensionService()->process_map();
ASSERT_TRUE(process_map->Contains(
- extension->id(), extension_host->render_view_host()->process()->id()));
+ extension->id(), extension_host->render_view_host()->process()->
+ GetID()));
}
void LoadTestExtension() {
diff --git a/chrome/browser/extensions/extension_event_router.cc b/chrome/browser/extensions/extension_event_router.cc
index 73c7db2..54336ee 100644
--- a/chrome/browser/extensions/extension_event_router.cc
+++ b/chrome/browser/extensions/extension_event_router.cc
@@ -22,8 +22,8 @@
#include "chrome/common/extensions/extension_messages.h"
#include "chrome/common/extensions/api/extension_api.h"
#include "content/browser/child_process_security_policy.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/render_process_host.h"
using content::BrowserThread;
using extensions::ExtensionAPI;
@@ -43,10 +43,11 @@ void NotifyEventListenerRemovedOnIOThread(
} // namespace
struct ExtensionEventRouter::EventListener {
- RenderProcessHost* process;
+ content::RenderProcessHost* process;
std::string extension_id;
- EventListener(RenderProcessHost* process, const std::string& extension_id)
+ EventListener(content::RenderProcessHost* process,
+ const std::string& extension_id)
: process(process), extension_id(extension_id) {}
bool operator<(const EventListener& that) const {
@@ -109,14 +110,15 @@ ExtensionEventRouter::~ExtensionEventRouter() {}
void ExtensionEventRouter::AddEventListener(
const std::string& event_name,
- RenderProcessHost* process,
+ content::RenderProcessHost* process,
const std::string& extension_id) {
EventListener listener(process, extension_id);
DCHECK_EQ(listeners_[event_name].count(listener), 0u) << event_name;
listeners_[event_name].insert(listener);
if (extension_devtools_manager_.get())
- extension_devtools_manager_->AddEventListener(event_name, process->id());
+ extension_devtools_manager_->AddEventListener(event_name,
+ process->GetID());
// We lazily tell the TaskManager to start updating when listeners to the
// processes.onUpdated event arrive.
@@ -126,18 +128,19 @@ void ExtensionEventRouter::AddEventListener(
void ExtensionEventRouter::RemoveEventListener(
const std::string& event_name,
- RenderProcessHost* process,
+ content::RenderProcessHost* process,
const std::string& extension_id) {
EventListener listener(process, extension_id);
DCHECK_EQ(listeners_[event_name].count(listener), 1u) <<
- " PID=" << process->id() << " extension=" << extension_id <<
+ " PID=" << process->GetID() << " extension=" << extension_id <<
" event=" << event_name;
listeners_[event_name].erase(listener);
// Note: extension_id may point to data in the now-deleted listeners_ object.
// Do not use.
if (extension_devtools_manager_.get())
- extension_devtools_manager_->RemoveEventListener(event_name, process->id());
+ extension_devtools_manager_->RemoveEventListener(event_name,
+ process->GetID());
// If a processes.onUpdated event listener is removed (or a process with one
// exits), then we let the TaskManager know that it has one fewer listener.
@@ -273,14 +276,13 @@ void ExtensionEventRouter::DispatchEventImpl(
continue;
Profile* listener_profile = Profile::FromBrowserContext(
- listener->process->browser_context());
+ listener->process->GetBrowserContext());
extensions::ProcessMap* process_map =
listener_profile->GetExtensionService()->process_map();
-
// If the event is privileged, only send to extension processes. Otherwise,
// it's OK to send to normal renderers (e.g., for content scripts).
if (ExtensionAPI::GetInstance()->IsPrivileged(event->event_name) &&
- !process_map->Contains(extension->id(), listener->process->id())) {
+ !process_map->Contains(extension->id(), listener->process->GetID())) {
continue;
}
@@ -366,8 +368,8 @@ void ExtensionEventRouter::Observe(
switch (type) {
case content::NOTIFICATION_RENDERER_PROCESS_TERMINATED:
case content::NOTIFICATION_RENDERER_PROCESS_CLOSED: {
- RenderProcessHost* renderer =
- content::Source<RenderProcessHost>(source).ptr();
+ content::RenderProcessHost* renderer =
+ content::Source<content::RenderProcessHost>(source).ptr();
// Remove all event listeners associated with this renderer
for (ListenerMap::iterator it = listeners_.begin();
it != listeners_.end(); ) {
diff --git a/chrome/browser/extensions/extension_event_router.h b/chrome/browser/extensions/extension_event_router.h
index ade675e..cc2608d 100644
--- a/chrome/browser/extensions/extension_event_router.h
+++ b/chrome/browser/extensions/extension_event_router.h
@@ -21,7 +21,10 @@ class GURL;
class Extension;
class ExtensionDevToolsManager;
class Profile;
+
+namespace content {
class RenderProcessHost;
+}
class ExtensionEventRouter : public content::NotificationObserver {
public:
@@ -41,10 +44,10 @@ class ExtensionEventRouter : public content::NotificationObserver {
// collapsing. Also, a single extension can have 2 processes if it is a split
// mode extension.
void AddEventListener(const std::string& event_name,
- RenderProcessHost* process,
+ content::RenderProcessHost* process,
const std::string& extension_id);
void RemoveEventListener(const std::string& event_name,
- RenderProcessHost* process,
+ content::RenderProcessHost* process,
const std::string& extension_id);
// Returns true if there is at least one listener for the given event.
diff --git a/chrome/browser/extensions/extension_file_browser_private_api.cc b/chrome/browser/extensions/extension_file_browser_private_api.cc
index b66e898..b102d88d 100644
--- a/chrome/browser/extensions/extension_file_browser_private_api.cc
+++ b/chrome/browser/extensions/extension_file_browser_private_api.cc
@@ -33,10 +33,10 @@
#include "chrome/common/extensions/file_browser_handler.h"
#include "chrome/common/pref_names.h"
#include "content/browser/child_process_security_policy.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/render_process_host.h"
#include "googleurl/src/gurl.h"
#include "grit/generated_resources.h"
#include "grit/platform_locale_settings.h"
@@ -443,7 +443,7 @@ bool RequestLocalFileSystemFunction::RunImpl() {
&RequestLocalFileSystemFunction::RequestOnFileThread,
this,
source_url_,
- render_view_host()->process()->id()));
+ render_view_host()->process()->GetID()));
// Will finish asynchronously.
return true;
}
@@ -722,9 +722,9 @@ class ExecuteTasksFileBrowserFunction::ExecuteTasksFileSystemCallbackDispatcher
SiteInstance* site_instance = manager->GetSiteInstanceForURL(extension_url);
if (!site_instance || !site_instance->HasProcess())
return;
- RenderProcessHost* process = site_instance->GetProcess();
+ content::RenderProcessHost* process = site_instance->GetProcess();
- target_process_id_ = process->id();
+ target_process_id_ = process->GetID();
}
// Checks legitimacy of file url and grants file RO access permissions from
@@ -882,7 +882,7 @@ void ExecuteTasksFileBrowserFunction::RequestFileEntryOnFileThread(
new ExecuteTasksFileSystemCallbackDispatcher(
this,
profile(),
- render_view_host()->process()->id(),
+ render_view_host()->process()->GetID(),
source_url,
GetExtension(),
task_id,
diff --git a/chrome/browser/extensions/extension_function.cc b/chrome/browser/extensions/extension_function.cc
index c4a502f..c87c15a 100644
--- a/chrome/browser/extensions/extension_function.cc
+++ b/chrome/browser/extensions/extension_function.cc
@@ -11,11 +11,11 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/renderer_host/chrome_render_message_filter.h"
#include "chrome/common/extensions/extension_messages.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/user_metrics.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/render_process_host.h"
#include "content/public/common/result_codes.h"
using content::BrowserThread;
@@ -116,7 +116,7 @@ void ExtensionFunction::SendResponseImpl(base::ProcessHandle process,
void ExtensionFunction::HandleBadMessage(base::ProcessHandle process) {
LOG(ERROR) << "bad extension message " << name_ << " : terminating renderer.";
- if (RenderProcessHost::run_renderer_in_process()) {
+ if (content::RenderProcessHost::run_renderer_in_process()) {
// In single process mode it is better if we don't suicide but just crash.
CHECK(false);
} else {
diff --git a/chrome/browser/extensions/extension_function_dispatcher.cc b/chrome/browser/extensions/extension_function_dispatcher.cc
index c94b277..2482a0a 100644
--- a/chrome/browser/extensions/extension_function_dispatcher.cc
+++ b/chrome/browser/extensions/extension_function_dispatcher.cc
@@ -581,7 +581,7 @@ Browser* ExtensionFunctionDispatcher::GetCurrentBrowser(
// we will search the incognito version only, regardless of the value of
// |include_incognito|.
Profile* profile = Profile::FromBrowserContext(
- render_view_host->process()->browser_context());
+ render_view_host->process()->GetBrowserContext());
browser = BrowserList::FindTabbedBrowser(profile, include_incognito);
// NOTE(rafaelw): This can return NULL in some circumstances. In particular,
@@ -608,7 +608,7 @@ void ExtensionFunctionDispatcher::Dispatch(
scoped_refptr<ExtensionFunction> function(
CreateExtensionFunction(params, extension,
- render_view_host->process()->id(),
+ render_view_host->process()->GetID(),
*(service->process_map()),
profile(), render_view_host,
render_view_host->routing_id()));
diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc
index 6c97feb..36743e3 100644
--- a/chrome/browser/extensions/extension_host.cc
+++ b/chrome/browser/extensions/extension_host.cc
@@ -31,12 +31,11 @@
#include "chrome/common/url_constants.h"
#include "chrome/common/chrome_view_types.h"
#include "content/browser/browsing_instance.h"
-#include "content/browser/renderer_host/browser_render_process_host.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/render_process_host.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/native_web_keyboard_event.h"
#include "grit/browser_resources.h"
@@ -185,7 +184,7 @@ TabContents* ExtensionHost::GetAssociatedTabContents() const {
return associated_tab_contents_;
}
-RenderProcessHost* ExtensionHost::render_process_host() const {
+content::RenderProcessHost* ExtensionHost::render_process_host() const {
return host_contents()->GetRenderProcessHost();
}
diff --git a/chrome/browser/extensions/extension_host.h b/chrome/browser/extensions/extension_host.h
index 4475ade..c098376 100644
--- a/chrome/browser/extensions/extension_host.h
+++ b/chrome/browser/extensions/extension_host.h
@@ -29,12 +29,15 @@
class Browser;
class Extension;
-class RenderProcessHost;
class RenderWidgetHostView;
class TabContents;
struct ViewHostMsg_RunFileChooser_Params;
struct WebPreferences;
+namespace content {
+class RenderProcessHost;
+}
+
// This class is the browser component of an extension component's RenderView.
// It handles setting up the renderer process, if needed, with special
// privileges available to extensions. It may have a view to be shown in the
@@ -72,7 +75,7 @@ class ExtensionHost : public TabContentsDelegate,
const std::string& extension_id() const { return extension_id_; }
TabContents* host_contents() const { return host_contents_.get(); }
RenderViewHost* render_view_host() const;
- RenderProcessHost* render_process_host() const;
+ content::RenderProcessHost* render_process_host() const;
bool did_stop_loading() const { return did_stop_loading_; }
bool document_element_available() const {
return document_element_available_;
diff --git a/chrome/browser/extensions/extension_message_handler.cc b/chrome/browser/extensions/extension_message_handler.cc
index f600fa5..6ba6e46 100644
--- a/chrome/browser/extensions/extension_message_handler.cc
+++ b/chrome/browser/extensions/extension_message_handler.cc
@@ -10,7 +10,7 @@
#include "content/browser/child_process_security_policy.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_view_host_delegate.h"
-#include "content/browser/renderer_host/render_process_host.h"
+#include "content/public/browser/render_process_host.h"
ExtensionMessageHandler::ExtensionMessageHandler(
RenderViewHost* render_view_host)
@@ -38,7 +38,7 @@ void ExtensionMessageHandler::RenderViewHostInitialized() {
void ExtensionMessageHandler::OnPostMessage(int port_id,
const std::string& message) {
Profile* profile = Profile::FromBrowserContext(
- render_view_host()->process()->browser_context());
+ render_view_host()->process()->GetBrowserContext());
if (profile->GetExtensionMessageService()) {
profile->GetExtensionMessageService()->PostMessageFromRenderer(
port_id, message);
diff --git a/chrome/browser/extensions/extension_message_service.cc b/chrome/browser/extensions/extension_message_service.cc
index d89b6e6..361c408 100644
--- a/chrome/browser/extensions/extension_message_service.cc
+++ b/chrome/browser/extensions/extension_message_service.cc
@@ -17,11 +17,11 @@
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_messages.h"
#include "content/browser/child_process_security_policy.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/render_process_host.h"
// Since we have 2 ports for every channel, we just index channels by half the
// port ID.
@@ -94,7 +94,7 @@ static void DispatchOnMessage(const ExtensionMessageService::MessagePort& port,
port.routing_id, target_port_id, message));
}
-static RenderProcessHost* GetExtensionProcess(Profile* profile,
+static content::RenderProcessHost* GetExtensionProcess(Profile* profile,
const std::string& extension_id) {
SiteInstance* site_instance =
profile->GetExtensionProcessManager()->GetSiteInstanceForURL(
@@ -153,10 +153,11 @@ void ExtensionMessageService::OpenChannelToExtension(
const std::string& source_extension_id,
const std::string& target_extension_id,
const std::string& channel_name) {
- RenderProcessHost* source = RenderProcessHost::FromID(source_process_id);
+ content::RenderProcessHost* source =
+ content::RenderProcessHost::FromID(source_process_id);
if (!source)
return;
- Profile* profile = Profile::FromBrowserContext(source->browser_context());
+ Profile* profile = Profile::FromBrowserContext(source->GetBrowserContext());
// Note: we use the source's profile here. If the source is an incognito
// process, we will use the incognito EPM to find the right extension process,
@@ -183,10 +184,11 @@ void ExtensionMessageService::OpenChannelToTab(
int source_process_id, int source_routing_id, int receiver_port_id,
int tab_id, const std::string& extension_id,
const std::string& channel_name) {
- RenderProcessHost* source = RenderProcessHost::FromID(source_process_id);
+ content::RenderProcessHost* source =
+ content::RenderProcessHost::FromID(source_process_id);
if (!source)
return;
- Profile* profile = Profile::FromBrowserContext(source->browser_context());
+ Profile* profile = Profile::FromBrowserContext(source->GetBrowserContext());
TabContentsWrapper* contents = NULL;
MessagePort receiver;
@@ -345,8 +347,8 @@ void ExtensionMessageService::Observe(
switch (type) {
case content::NOTIFICATION_RENDERER_PROCESS_TERMINATED:
case content::NOTIFICATION_RENDERER_PROCESS_CLOSED: {
- RenderProcessHost* renderer =
- content::Source<RenderProcessHost>(source).ptr();
+ content::RenderProcessHost* renderer =
+ content::Source<content::RenderProcessHost>(source).ptr();
OnSenderClosed(renderer);
break;
}
diff --git a/chrome/browser/extensions/extension_permissions_api.cc b/chrome/browser/extensions/extension_permissions_api.cc
index b6ce293..bfc7116 100644
--- a/chrome/browser/extensions/extension_permissions_api.cc
+++ b/chrome/browser/extensions/extension_permissions_api.cc
@@ -218,10 +218,11 @@ void ExtensionPermissionsManager::NotifyPermissionsUpdated(
content::Details<UpdatedExtensionPermissionsInfo>(&info));
// Send the new permissions to the renderers.
- for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator());
+ for (content::RenderProcessHost::iterator i(
+ content::RenderProcessHost::AllHostsIterator());
!i.IsAtEnd(); i.Advance()) {
- RenderProcessHost* host = i.GetCurrentValue();
- Profile* profile = Profile::FromBrowserContext(host->browser_context());
+ content::RenderProcessHost* host = i.GetCurrentValue();
+ Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext());
if (extension_service_->profile()->IsSameProfile(profile))
host->Send(new ExtensionMsg_UpdatePermissions(
static_cast<int>(reason),
diff --git a/chrome/browser/extensions/extension_permissions_api.h b/chrome/browser/extensions/extension_permissions_api.h
index 22563b9..583302e 100644
--- a/chrome/browser/extensions/extension_permissions_api.h
+++ b/chrome/browser/extensions/extension_permissions_api.h
@@ -13,7 +13,7 @@
#include "chrome/browser/extensions/extension_install_ui.h"
#include "chrome/common/extensions/extension_permission_set.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/browser/renderer_host/render_process_host.h"
+#include "content/public/browser/render_process_host.h"
class Extension;
class ExtensionPermissionSet;
diff --git a/chrome/browser/extensions/extension_processes_api.cc b/chrome/browser/extensions/extension_processes_api.cc
index a35096f..5ca38b3 100644
--- a/chrome/browser/extensions/extension_processes_api.cc
+++ b/chrome/browser/extensions/extension_processes_api.cc
@@ -20,9 +20,9 @@
#include "chrome/browser/task_manager/task_manager.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/extensions/extension_error_utils.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/render_process_host.h"
namespace keys = extension_processes_api_constants;
diff --git a/chrome/browser/extensions/extension_save_page_api.cc b/chrome/browser/extensions/extension_save_page_api.cc
index 7fb8416..2a934b2 100644
--- a/chrome/browser/extensions/extension_save_page_api.cc
+++ b/chrome/browser/extensions/extension_save_page_api.cc
@@ -124,7 +124,7 @@ void SavePageAsMHTMLFunction::ReturnFailure(const std::string& error) {
void SavePageAsMHTMLFunction::ReturnSuccess(int64 file_size) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- int child_id = render_view_host()->process()->id();
+ int child_id = render_view_host()->process()->GetID();
ChildProcessSecurityPolicy::GetInstance()->GrantReadFile(
child_id, mhtml_path_);
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 3f77711..9f55624 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -87,12 +87,12 @@
#include "content/browser/debugger/devtools_manager.h"
#include "content/browser/plugin_process_host.h"
#include "content/browser/plugin_service.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/user_metrics.h"
#include "content/common/pepper_plugin_registry.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/render_process_host.h"
#include "googleurl/src/gurl.h"
#include "net/base/registry_controlled_domain.h"
#include "webkit/database/database_tracker.h"
@@ -916,11 +916,12 @@ void ExtensionService::NotifyExtensionLoaded(const Extension* extension) {
content::Details<const Extension>(extension));
// Tell renderers about the new extension.
- for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator());
+ for (content::RenderProcessHost::iterator i(
+ content::RenderProcessHost::AllHostsIterator());
!i.IsAtEnd(); i.Advance()) {
- RenderProcessHost* host = i.GetCurrentValue();
+ content::RenderProcessHost* host = i.GetCurrentValue();
Profile* host_profile =
- Profile::FromBrowserContext(host->browser_context());
+ Profile::FromBrowserContext(host->GetBrowserContext());
if (host_profile->GetOriginalProfile() == profile_->GetOriginalProfile()) {
std::vector<ExtensionMsg_Loaded_Params> loaded_extensions(
1, ExtensionMsg_Loaded_Params(extension));
@@ -1036,11 +1037,12 @@ void ExtensionService::NotifyExtensionUnloaded(
content::Source<Profile>(profile_),
content::Details<UnloadedExtensionInfo>(&details));
- for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator());
+ for (content::RenderProcessHost::iterator i(
+ content::RenderProcessHost::AllHostsIterator());
!i.IsAtEnd(); i.Advance()) {
- RenderProcessHost* host = i.GetCurrentValue();
+ content::RenderProcessHost* host = i.GetCurrentValue();
Profile* host_profile =
- Profile::FromBrowserContext(host->browser_context());
+ Profile::FromBrowserContext(host->GetBrowserContext());
if (host_profile->GetOriginalProfile() == profile_->GetOriginalProfile())
host->Send(new ExtensionMsg_Unloaded(extension->id()));
}
@@ -2316,10 +2318,10 @@ void ExtensionService::Observe(int type,
break;
}
case content::NOTIFICATION_RENDERER_PROCESS_CREATED: {
- RenderProcessHost* process =
- content::Source<RenderProcessHost>(source).ptr();
+ content::RenderProcessHost* process =
+ content::Source<content::RenderProcessHost>(source).ptr();
Profile* host_profile =
- Profile::FromBrowserContext(process->browser_context());
+ Profile::FromBrowserContext(process->GetBrowserContext());
if (!profile_->IsSameProfile(host_profile->GetOriginalProfile()))
break;
@@ -2343,21 +2345,21 @@ void ExtensionService::Observe(int type,
break;
}
case content::NOTIFICATION_RENDERER_PROCESS_TERMINATED: {
- RenderProcessHost* process =
- content::Source<RenderProcessHost>(source).ptr();
+ content::RenderProcessHost* process =
+ content::Source<content::RenderProcessHost>(source).ptr();
Profile* host_profile =
- Profile::FromBrowserContext(process->browser_context());
+ Profile::FromBrowserContext(process->GetBrowserContext());
if (!profile_->IsSameProfile(host_profile->GetOriginalProfile()))
break;
- installed_app_hosts_.erase(process->id());
+ installed_app_hosts_.erase(process->GetID());
- process_map_.Remove(process->id());
+ process_map_.Remove(process->GetID());
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(&ExtensionInfoMap::UnregisterAllExtensionsInProcess,
profile_->GetExtensionInfoMap(),
- process->id()));
+ process->GetID()));
break;
}
case chrome::NOTIFICATION_PREF_CHANGED: {
diff --git a/chrome/browser/extensions/extension_tab_helper.cc b/chrome/browser/extensions/extension_tab_helper.cc
index 7ad5261..3456a53 100644
--- a/chrome/browser/extensions/extension_tab_helper.cc
+++ b/chrome/browser/extensions/extension_tab_helper.cc
@@ -169,7 +169,7 @@ void ExtensionTabHelper::OnGetAppNotifyChannel(
Profile::FromBrowserContext(tab_contents()->browser_context());
ExtensionService* extension_service = profile->GetExtensionService();
extensions::ProcessMap* process_map = extension_service->process_map();
- RenderProcessHost* process =
+ content::RenderProcessHost* process =
tab_contents_wrapper()->render_view_host()->process();
const Extension* extension =
extension_service->GetInstalledApp(requestor_url);
@@ -177,7 +177,7 @@ void ExtensionTabHelper::OnGetAppNotifyChannel(
extension &&
extension->HasAPIPermission(
ExtensionAPIPermission::kExperimental) &&
- process_map->Contains(extension->id(), process->id());
+ process_map->Contains(extension->id(), process->GetID());
if (!allowed) {
AppNotifyChannelSetupComplete("", "permission_error", return_route_id,
callback_id);
diff --git a/chrome/browser/extensions/extension_tab_id_map.cc b/chrome/browser/extensions/extension_tab_id_map.cc
index bf51e24..581e8e4 100644
--- a/chrome/browser/extensions/extension_tab_id_map.cc
+++ b/chrome/browser/extensions/extension_tab_id_map.cc
@@ -74,7 +74,7 @@ void ExtensionTabIdMap::TabObserver::Observe(
base::Bind(
&ExtensionTabIdMap::SetTabAndWindowId,
base::Unretained(ExtensionTabIdMap::GetInstance()),
- host->process()->id(), host->routing_id(),
+ host->process()->GetID(), host->routing_id(),
tab->restore_tab_helper()->session_id().id(),
tab->restore_tab_helper()->window_id().id()));
break;
@@ -88,7 +88,7 @@ void ExtensionTabIdMap::TabObserver::Observe(
base::Bind(
&ExtensionTabIdMap::SetTabAndWindowId,
base::Unretained(ExtensionTabIdMap::GetInstance()),
- host->process()->id(), host->routing_id(),
+ host->process()->GetID(), host->routing_id(),
tab->restore_tab_helper()->session_id().id(),
tab->restore_tab_helper()->window_id().id()));
break;
@@ -107,7 +107,7 @@ void ExtensionTabIdMap::TabObserver::Observe(
base::Bind(
&ExtensionTabIdMap::SetTabAndWindowId,
base::Unretained(ExtensionTabIdMap::GetInstance()),
- host->process()->id(), host->routing_id(),
+ host->process()->GetID(), host->routing_id(),
tab->restore_tab_helper()->session_id().id(),
tab->restore_tab_helper()->window_id().id()));
break;
@@ -119,7 +119,7 @@ void ExtensionTabIdMap::TabObserver::Observe(
base::Bind(
&ExtensionTabIdMap::ClearTabAndWindowId,
base::Unretained(ExtensionTabIdMap::GetInstance()),
- host->process()->id(), host->routing_id()));
+ host->process()->GetID(), host->routing_id()));
break;
}
default:
diff --git a/chrome/browser/extensions/extension_webrequest_api.cc b/chrome/browser/extensions/extension_webrequest_api.cc
index 9a2c189..e6038ed 100644
--- a/chrome/browser/extensions/extension_webrequest_api.cc
+++ b/chrome/browser/extensions/extension_webrequest_api.cc
@@ -290,10 +290,11 @@ void NotifyWebRequestAPIUsed(void* profile_id, const Extension* extension) {
profile->GetExtensionService()->SetHasUsedWebRequest(extension, true);
content::BrowserContext* browser_context = profile;
- for (RenderProcessHost::iterator it = RenderProcessHost::AllHostsIterator();
+ for (content::RenderProcessHost::iterator it =
+ content::RenderProcessHost::AllHostsIterator();
!it.IsAtEnd(); it.Advance()) {
- RenderProcessHost* host = it.GetCurrentValue();
- if (host->browser_context() == browser_context)
+ content::RenderProcessHost* host = it.GetCurrentValue();
+ if (host->GetBrowserContext() == browser_context)
SendExtensionWebRequestStatusToHost(host);
}
}
@@ -1629,8 +1630,8 @@ void WebRequestHandlerBehaviorChanged::OnQuotaExceeded() {
Run();
}
-void SendExtensionWebRequestStatusToHost(RenderProcessHost* host) {
- Profile* profile = Profile::FromBrowserContext(host->browser_context());
+void SendExtensionWebRequestStatusToHost(content::RenderProcessHost* host) {
+ Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext());
if (!profile || !profile->GetExtensionService())
return;
diff --git a/chrome/browser/extensions/extension_webrequest_api.h b/chrome/browser/extensions/extension_webrequest_api.h
index 8e28f41..400d46a 100644
--- a/chrome/browser/extensions/extension_webrequest_api.h
+++ b/chrome/browser/extensions/extension_webrequest_api.h
@@ -26,13 +26,16 @@
class ExtensionInfoMap;
class ExtensionWebRequestTimeTracker;
class GURL;
-class RenderProcessHost;
namespace base {
class DictionaryValue;
class ListValue;
}
+namespace content {
+class RenderProcessHost;
+}
+
namespace net {
class AuthCredentials;
class AuthChallengeInfo;
@@ -366,6 +369,6 @@ class WebRequestHandlerBehaviorChanged : public SyncIOThreadExtensionFunction {
// Send updates to |host| with information about what webRequest-related
// extensions are installed.
// TODO(mpcomplete): remove. http://crbug.com/100411
-void SendExtensionWebRequestStatusToHost(RenderProcessHost* host);
+void SendExtensionWebRequestStatusToHost(content::RenderProcessHost* host);
#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEBREQUEST_API_H_
diff --git a/chrome/browser/extensions/isolated_app_browsertest.cc b/chrome/browser/extensions/isolated_app_browsertest.cc
index 541a0ce..431aa7a 100644
--- a/chrome/browser/extensions/isolated_app_browsertest.cc
+++ b/chrome/browser/extensions/isolated_app_browsertest.cc
@@ -12,10 +12,10 @@
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/test/base/ui_test_utils.h"
-#include "content/browser/renderer_host/browser_render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/common/test_url_constants.h"
+#include "content/public/browser/render_process_host.h"
#include "net/base/mock_host_resolver.h"
namespace {
@@ -37,7 +37,7 @@ class IsolatedAppTest : public ExtensionBrowserTest {
ExtensionService* service = profile->GetExtensionService();
if (service) {
installed_app = service->GetInstalledAppForRenderer(
- contents->render_view_host()->process()->id());
+ contents->render_view_host()->process()->GetID());
}
return installed_app;
}
@@ -169,7 +169,7 @@ IN_PROC_BROWSER_TEST_F(IsolatedAppTest, NoCookieIsolationWithoutApp) {
// RenderProcessHosts even if we hit the process limit.
IN_PROC_BROWSER_TEST_F(IsolatedAppTest, ProcessOverflow) {
// Set max renderers to 1 to force running out of processes.
- RenderProcessHost::SetMaxRendererProcessCountForTest(1);
+ content::RenderProcessHost::SetMaxRendererProcessCountForTest(1);
host_resolver()->AddRule("*", "127.0.0.1");
ASSERT_TRUE(test_server()->Start());
@@ -205,15 +205,15 @@ IN_PROC_BROWSER_TEST_F(IsolatedAppTest, ProcessOverflow) {
NEW_FOREGROUND_TAB, ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
ASSERT_EQ(5, browser()->tab_count());
- RenderProcessHost* isolated1_host =
+ content::RenderProcessHost* isolated1_host =
browser()->GetTabContentsAt(0)->GetRenderProcessHost();
- RenderProcessHost* ntp_host =
+ content::RenderProcessHost* ntp_host =
browser()->GetTabContentsAt(1)->GetRenderProcessHost();
- RenderProcessHost* normal_extension_host =
+ content::RenderProcessHost* normal_extension_host =
browser()->GetTabContentsAt(2)->GetRenderProcessHost();
- RenderProcessHost* web_host =
+ content::RenderProcessHost* web_host =
browser()->GetTabContentsAt(3)->GetRenderProcessHost();
- RenderProcessHost* isolated2_host =
+ content::RenderProcessHost* isolated2_host =
browser()->GetTabContentsAt(4)->GetRenderProcessHost();
// Isolated apps shared with each other, but no one else. They're clannish
diff --git a/chrome/browser/extensions/user_script_master.cc b/chrome/browser/extensions/user_script_master.cc
index f936459..7a2082a 100644
--- a/chrome/browser/extensions/user_script_master.cc
+++ b/chrome/browser/extensions/user_script_master.cc
@@ -24,8 +24,8 @@
#include "chrome/common/extensions/extension_message_bundle.h"
#include "chrome/common/extensions/extension_resource.h"
#include "chrome/common/extensions/extension_set.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/render_process_host.h"
using content::BrowserThread;
@@ -320,7 +320,8 @@ void UserScriptMaster::NewScriptsAvailable(base::SharedMemory* handle) {
// We've got scripts ready to go.
shared_memory_.swap(handle_deleter);
- for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator());
+ for (content::RenderProcessHost::iterator i(
+ content::RenderProcessHost::AllHostsIterator());
!i.IsAtEnd(); i.Advance()) {
SendUpdate(i.GetCurrentValue(), handle);
}
@@ -380,10 +381,10 @@ void UserScriptMaster::Observe(int type,
break;
}
case content::NOTIFICATION_RENDERER_PROCESS_CREATED: {
- RenderProcessHost* process =
- content::Source<RenderProcessHost>(source).ptr();
+ content::RenderProcessHost* process =
+ content::Source<content::RenderProcessHost>(source).ptr();
Profile* profile = Profile::FromBrowserContext(
- process->browser_context());
+ process->GetBrowserContext());
if (!profile_->IsSameProfile(profile))
return;
if (ScriptsReady())
@@ -410,9 +411,9 @@ void UserScriptMaster::StartLoad() {
script_reloader_->StartLoad(user_scripts_, extensions_info_);
}
-void UserScriptMaster::SendUpdate(RenderProcessHost* process,
+void UserScriptMaster::SendUpdate(content::RenderProcessHost* process,
base::SharedMemory* shared_memory) {
- Profile* profile = Profile::FromBrowserContext(process->browser_context());
+ Profile* profile = Profile::FromBrowserContext(process->GetBrowserContext());
// Make sure we only send user scripts to processes in our profile.
if (!profile_->IsSameProfile(profile))
return;
diff --git a/chrome/browser/extensions/user_script_master.h b/chrome/browser/extensions/user_script_master.h
index 291d932..2be6189 100644
--- a/chrome/browser/extensions/user_script_master.h
+++ b/chrome/browser/extensions/user_script_master.h
@@ -26,8 +26,11 @@ namespace base {
class StringPiece;
}
-class Profile;
+namespace content {
class RenderProcessHost;
+}
+
+class Profile;
typedef std::map<std::string, ExtensionSet::ExtensionPathAndDefaultLocale>
ExtensionsInfo;
@@ -135,7 +138,7 @@ class UserScriptMaster : public base::RefCountedThreadSafe<UserScriptMaster>,
const content::NotificationDetails& details) OVERRIDE;
// Sends the renderer process a new set of user scripts.
- void SendUpdate(RenderProcessHost* process,
+ void SendUpdate(content::RenderProcessHost* process,
base::SharedMemory* shared_memory);
// Manages our notification registrations.
diff --git a/chrome/browser/external_tab_container_win.cc b/chrome/browser/external_tab_container_win.cc
index 6a0cc75..7dd57ae 100644
--- a/chrome/browser/external_tab_container_win.cc
+++ b/chrome/browser/external_tab_container_win.cc
@@ -560,7 +560,7 @@ void ExternalTabContainer::RegisterRenderViewHostForAutomation(
RenderViewHost* render_view_host, bool pending_view) {
if (render_view_host) {
AutomationResourceMessageFilter::RegisterRenderView(
- render_view_host->process()->id(),
+ render_view_host->process()->GetID(),
render_view_host->routing_id(),
tab_handle(),
automation_resource_message_filter_,
@@ -584,7 +584,7 @@ void ExternalTabContainer::UnregisterRenderViewHost(
// ExternalTabContainer::RegisterRenderViewHost.
if (render_view_host) {
AutomationResourceMessageFilter::UnRegisterRenderView(
- render_view_host->process()->id(),
+ render_view_host->process()->GetID(),
render_view_host->routing_id());
}
}
@@ -1092,7 +1092,7 @@ void ExternalTabContainer::OnReinitialize() {
RenderViewHost* rvh = tab_contents_->render_view_host();
if (rvh) {
AutomationResourceMessageFilter::ResumePendingRenderView(
- rvh->process()->id(), rvh->routing_id(),
+ rvh->process()->GetID(), rvh->routing_id(),
tab_handle_, automation_resource_message_filter_);
}
}
diff --git a/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc b/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc
index f7f93e3..af78c29 100644
--- a/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc
+++ b/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc
@@ -95,10 +95,12 @@ class GeolocationPermissionContextTests : public TabContentsWrapperTestHarness {
protected:
virtual ~GeolocationPermissionContextTests();
- int process_id() { return contents()->render_view_host()->process()->id(); }
+ int process_id() {
+ return contents()->render_view_host()->process()->GetID();
+ }
int process_id_for_tab(int tab) {
return extra_tabs_[tab]->tab_contents()->render_view_host()->process()->
- id();
+ GetID();
}
int render_id() { return contents()->render_view_host()->routing_id(); }
int render_id_for_tab(int tab) {
diff --git a/chrome/browser/memory_details.cc b/chrome/browser/memory_details.cc
index 3f5cb15..20d04a4 100644
--- a/chrome/browser/memory_details.cc
+++ b/chrome/browser/memory_details.cc
@@ -18,11 +18,11 @@
#include "chrome/common/url_constants.h"
#include "content/browser/browser_child_process_host.h"
#include "content/browser/renderer_host/backing_store_manager.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/render_process_host.h"
#include "content/public/common/bindings_policy.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -130,10 +130,11 @@ void MemoryDetails::CollectChildInfoOnUIThread() {
ProcessMemoryInformation& process =
chrome_browser->processes[index];
- for (RenderProcessHost::iterator renderer_iter(
- RenderProcessHost::AllHostsIterator()); !renderer_iter.IsAtEnd();
- renderer_iter.Advance()) {
- RenderProcessHost* render_process_host = renderer_iter.GetCurrentValue();
+ for (content::RenderProcessHost::iterator renderer_iter(
+ content::RenderProcessHost::AllHostsIterator());
+ !renderer_iter.IsAtEnd(); renderer_iter.Advance()) {
+ content::RenderProcessHost* render_process_host =
+ renderer_iter.GetCurrentValue();
DCHECK(render_process_host);
// Ignore processes that don't have a connection, such as crashed tabs.
if (!render_process_host->HasConnection() ||
@@ -142,7 +143,8 @@ void MemoryDetails::CollectChildInfoOnUIThread() {
}
process.type = ChildProcessInfo::RENDER_PROCESS;
Profile* profile =
- Profile::FromBrowserContext(render_process_host->browser_context());
+ Profile::FromBrowserContext(
+ render_process_host->GetBrowserContext());
ExtensionService* extension_service = profile->GetExtensionService();
extensions::ProcessMap* extension_process_map =
extension_service->process_map();
@@ -154,7 +156,7 @@ void MemoryDetails::CollectChildInfoOnUIThread() {
// NOTE: This is a bit dangerous. We know that for now, listeners
// are always RenderWidgetHosts. But in theory, they don't
// have to be.
- RenderProcessHost::listeners_iterator iter(
+ content::RenderProcessHost::listeners_iterator iter(
render_process_host->ListenersIterator());
for (; !iter.IsAtEnd(); iter.Advance()) {
const RenderWidgetHost* widget =
@@ -175,12 +177,12 @@ void MemoryDetails::CollectChildInfoOnUIThread() {
process.renderer_type = ChildProcessInfo::RENDERER_DEVTOOLS;
else
process.renderer_type = ChildProcessInfo::RENDERER_CHROME;
- } else if (extension_process_map->Contains(host->process()->id())) {
+ } else if (extension_process_map->Contains(host->process()->GetID())) {
// For our purposes, don't count processes containing only hosted apps
// as extension processes. See also: crbug.com/102533.
std::set<std::string> extension_ids =
extension_process_map->GetExtensionsInProcess(
- host->process()->id());
+ host->process()->GetID());
for (std::set<std::string>::iterator iter = extension_ids.begin();
iter != extension_ids.end(); ++iter) {
const Extension* extension =
@@ -193,7 +195,7 @@ void MemoryDetails::CollectChildInfoOnUIThread() {
}
TabContents* contents = host_delegate->GetAsTabContents();
if (!contents) {
- if (extension_process_map->Contains(host->process()->id())) {
+ if (extension_process_map->Contains(host->process()->GetID())) {
const Extension* extension =
extension_service->GetExtensionByURL(url);
if (extension) {
diff --git a/chrome/browser/memory_purger.cc b/chrome/browser/memory_purger.cc
index 5bce67c..260355f 100644
--- a/chrome/browser/memory_purger.cc
+++ b/chrome/browser/memory_purger.cc
@@ -16,9 +16,9 @@
#include "chrome/common/render_messages.h"
#include "content/browser/in_process_webkit/webkit_context.h"
#include "content/browser/renderer_host/backing_store_manager.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/render_process_host.h"
#include "net/proxy/proxy_resolver.h"
#include "net/proxy/proxy_service.h"
#include "net/url_request/url_request_context.h"
@@ -147,13 +147,14 @@ void MemoryPurger::PurgeRenderers() {
// Concern: Telling a bunch of renderer processes to destroy their data may
// cause them to page everything in to do it, which could take a lot of time/
// cause jank.
- for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator());
+ for (content::RenderProcessHost::iterator i(
+ content::RenderProcessHost::AllHostsIterator());
!i.IsAtEnd(); i.Advance())
PurgeRendererForHost(i.GetCurrentValue());
}
// static
-void MemoryPurger::PurgeRendererForHost(RenderProcessHost* host) {
+void MemoryPurger::PurgeRendererForHost(content::RenderProcessHost* host) {
// Direct the renderer to free everything it can.
host->Send(new ChromeViewMsg_PurgeMemory());
}
diff --git a/chrome/browser/memory_purger.h b/chrome/browser/memory_purger.h
index 667b530..4b7c553 100644
--- a/chrome/browser/memory_purger.h
+++ b/chrome/browser/memory_purger.h
@@ -16,7 +16,9 @@
#include "base/basictypes.h"
+namespace content {
class RenderProcessHost;
+}
class MemoryPurger {
public:
@@ -24,7 +26,7 @@ class MemoryPurger {
static void PurgeAll();
static void PurgeBrowser();
static void PurgeRenderers();
- static void PurgeRendererForHost(RenderProcessHost* host);
+ static void PurgeRendererForHost(content::RenderProcessHost* host);
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(MemoryPurger);
diff --git a/chrome/browser/metrics/field_trial_synchronizer.cc b/chrome/browser/metrics/field_trial_synchronizer.cc
index bef65bb..8a65557 100644
--- a/chrome/browser/metrics/field_trial_synchronizer.cc
+++ b/chrome/browser/metrics/field_trial_synchronizer.cc
@@ -8,8 +8,8 @@
#include "base/threading/thread.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/render_messages.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/render_process_host.h"
using content::BrowserThread;
@@ -31,7 +31,8 @@ void FieldTrialSynchronizer::NotifyAllRenderers(
// need to be on the UI thread.
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- for (RenderProcessHost::iterator it(RenderProcessHost::AllHostsIterator());
+ for (content::RenderProcessHost::iterator it(
+ content::RenderProcessHost::AllHostsIterator());
!it.IsAtEnd(); it.Advance()) {
it.GetCurrentValue()->Send(
new ChromeViewMsg_SetFieldTrialGroup(field_trial_name, group_name));
diff --git a/chrome/browser/metrics/histogram_synchronizer.cc b/chrome/browser/metrics/histogram_synchronizer.cc
index 3f87718..07266c1 100644
--- a/chrome/browser/metrics/histogram_synchronizer.cc
+++ b/chrome/browser/metrics/histogram_synchronizer.cc
@@ -9,8 +9,8 @@
#include "base/threading/thread.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/render_messages.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/render_process_host.h"
using base::Time;
using base::TimeDelta;
@@ -134,13 +134,15 @@ int HistogramSynchronizer::NotifyAllRenderers(
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
int notification_count = 0;
- for (RenderProcessHost::iterator it(RenderProcessHost::AllHostsIterator());
+ for (content::RenderProcessHost::iterator it(
+ content::RenderProcessHost::AllHostsIterator());
!it.IsAtEnd(); it.Advance())
++notification_count;
int sequence_number = GetNextAvailableSequenceNumber(requester,
notification_count);
- for (RenderProcessHost::iterator it(RenderProcessHost::AllHostsIterator());
+ for (content::RenderProcessHost::iterator it(
+ content::RenderProcessHost::AllHostsIterator());
!it.IsAtEnd(); it.Advance()) {
if (!it.GetCurrentValue()->Send(
new ChromeViewMsg_GetRendererHistograms(sequence_number)))
diff --git a/chrome/browser/metrics/metrics_service.cc b/chrome/browser/metrics/metrics_service.cc
index 92ab283..93dffd8 100644
--- a/chrome/browser/metrics/metrics_service.cc
+++ b/chrome/browser/metrics/metrics_service.cc
@@ -178,8 +178,8 @@
#include "chrome/common/render_messages.h"
#include "content/browser/load_notification_details.h"
#include "content/browser/plugin_service.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/render_process_host.h"
#include "content/public/common/url_fetcher.h"
#include "webkit/plugins/webplugininfo.h"
@@ -525,11 +525,12 @@ void MetricsService::Observe(int type,
break;
case content::NOTIFICATION_RENDERER_PROCESS_CLOSED: {
- RenderProcessHost::RendererClosedDetails* process_details =
- content::Details<RenderProcessHost::RendererClosedDetails>(
- details).ptr();
- RenderProcessHost* host =
- content::Source<RenderProcessHost>(source).ptr();
+ content::RenderProcessHost::RendererClosedDetails* process_details =
+ content::Details<
+ content::RenderProcessHost::RendererClosedDetails>(
+ details).ptr();
+ content::RenderProcessHost* host =
+ content::Source<content::RenderProcessHost>(source).ptr();
LogRendererCrash(
host, process_details->status, process_details->was_alive);
}
@@ -880,7 +881,8 @@ void MetricsService::StartScheduledUpload() {
details->StartFetch();
// Collect WebCore cache information to put into a histogram.
- for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator());
+ for (content::RenderProcessHost::iterator i(
+ content::RenderProcessHost::AllHostsIterator());
!i.IsAtEnd(); i.Advance())
i.GetCurrentValue()->Send(new ChromeViewMsg_GetCacheResourceStats());
}
@@ -1239,13 +1241,13 @@ void MetricsService::LogLoadStarted() {
// might be lost due to a crash :-(.
}
-void MetricsService::LogRendererCrash(RenderProcessHost* host,
+void MetricsService::LogRendererCrash(content::RenderProcessHost* host,
base::TerminationStatus status,
bool was_alive) {
- Profile* profile = Profile::FromBrowserContext(host->browser_context());
+ Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext());
ExtensionService* service = profile->GetExtensionService();
bool was_extension_process =
- service && service->process_map()->Contains(host->id());
+ service && service->process_map()->Contains(host->GetID());
if (status == base::TERMINATION_STATUS_PROCESS_CRASHED ||
status == base::TERMINATION_STATUS_ABNORMAL_TERMINATION) {
if (was_extension_process)
diff --git a/chrome/browser/metrics/metrics_service.h b/chrome/browser/metrics/metrics_service.h
index ee39a35..359b09f 100644
--- a/chrome/browser/metrics/metrics_service.h
+++ b/chrome/browser/metrics/metrics_service.h
@@ -33,7 +33,6 @@ class BookmarkNode;
class MetricsReportingScheduler;
class PrefService;
class Profile;
-class RenderProcessHost;
class TemplateURLService;
namespace base {
@@ -41,6 +40,10 @@ class DictionaryValue;
class MessageLoopProxy;
}
+namespace content {
+class RenderProcessHost;
+}
+
namespace prerender {
bool IsOmniboxEnabled(Profile* profile);
}
@@ -249,7 +252,7 @@ class MetricsService : public content::NotificationObserver,
void IncrementLongPrefsValue(const char* path);
// Records a renderer process crash.
- void LogRendererCrash(RenderProcessHost* host,
+ void LogRendererCrash(content::RenderProcessHost* host,
base::TerminationStatus status,
bool was_alive);
diff --git a/chrome/browser/metrics/tracking_synchronizer.cc b/chrome/browser/metrics/tracking_synchronizer.cc
index e1b3673..a12ad92 100644
--- a/chrome/browser/metrics/tracking_synchronizer.cc
+++ b/chrome/browser/metrics/tracking_synchronizer.cc
@@ -14,8 +14,8 @@
#include "chrome/browser/ui/webui/tracing_ui.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/render_messages.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/render_process_host.h"
using base::TimeTicks;
using content::BrowserThread;
@@ -84,9 +84,10 @@ void TrackingSynchronizer::SetTrackingStatus(bool enable) {
// to be on the UI thread.
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- for (RenderProcessHost::iterator it(RenderProcessHost::AllHostsIterator());
+ for (content::RenderProcessHost::iterator it(
+ content::RenderProcessHost::AllHostsIterator());
!it.IsAtEnd(); it.Advance()) {
- RenderProcessHost* render_process_host = it.GetCurrentValue();
+ content::RenderProcessHost* render_process_host = it.GetCurrentValue();
DCHECK(render_process_host);
// Ignore processes that don't have a connection, such as crashed tabs.
if (!render_process_host->HasConnection())
@@ -115,7 +116,8 @@ void TrackingSynchronizer::SetTrackingStatusInProcess(int process_id) {
bool enable = tracked_objects::ThreadData::tracking_status();
- RenderProcessHost* process = RenderProcessHost::FromID(process_id);
+ content::RenderProcessHost* process =
+ content::RenderProcessHost::FromID(process_id);
// Ignore processes that don't have a connection, such as crashed tabs.
if (!process || !process->HasConnection())
return;
@@ -173,9 +175,10 @@ int TrackingSynchronizer::RegisterAndNotifyAllProcesses(
outstanding_requests_[sequence_number] = request;
DCHECK_GT(request->processes_pending_, 0);
- for (RenderProcessHost::iterator it(RenderProcessHost::AllHostsIterator());
+ for (content::RenderProcessHost::iterator it(
+ content::RenderProcessHost::AllHostsIterator());
!it.IsAtEnd(); it.Advance()) {
- RenderProcessHost* render_process_host = it.GetCurrentValue();
+ content::RenderProcessHost* render_process_host = it.GetCurrentValue();
DCHECK(render_process_host);
// Ignore processes that don't have a connection, such as crashed tabs.
if (!render_process_host->HasConnection())
diff --git a/chrome/browser/notifications/balloon_host.cc b/chrome/browser/notifications/balloon_host.cc
index e6dfe39..d27c45e 100644
--- a/chrome/browser/notifications/balloon_host.cc
+++ b/chrome/browser/notifications/balloon_host.cc
@@ -14,12 +14,12 @@
#include "chrome/common/render_messages.h"
#include "chrome/common/url_constants.h"
#include "chrome/common/chrome_view_types.h"
-#include "content/browser/renderer_host/browser_render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/site_instance.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
+#include "content/public/browser/render_process_host.h"
#include "content/public/common/bindings_policy.h"
#include "content/public/common/renderer_preferences.h"
#include "ipc/ipc_message.h"
diff --git a/chrome/browser/oom_priority_manager.cc b/chrome/browser/oom_priority_manager.cc
index 1eb6de3..df8da3a 100644
--- a/chrome/browser/oom_priority_manager.cc
+++ b/chrome/browser/oom_priority_manager.cc
@@ -20,13 +20,13 @@
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/chrome_constants.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_widget_host.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/zygote_host_linux.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/render_process_host.h"
#if !defined(OS_CHROMEOS)
#error This file only meant to be compiled on ChromeOS
@@ -193,13 +193,14 @@ void OomPriorityManager::Observe(int type,
switch (type) {
case content::NOTIFICATION_RENDERER_PROCESS_CLOSED: {
handle =
- content::Details<RenderProcessHost::RendererClosedDetails>(details)->
- handle;
+ content::Details<content::RenderProcessHost::RendererClosedDetails>(
+ details)->handle;
pid_to_oom_score_.erase(handle);
break;
}
case content::NOTIFICATION_RENDERER_PROCESS_TERMINATED: {
- handle = content::Source<RenderProcessHost>(source)->GetHandle();
+ handle = content::Source<content::RenderProcessHost>(source)->
+ GetHandle();
pid_to_oom_score_.erase(handle);
break;
}
diff --git a/chrome/browser/pdf_unsupported_feature.cc b/chrome/browser/pdf_unsupported_feature.cc
index 098b549..8b7183c 100644
--- a/chrome/browser/pdf_unsupported_feature.cc
+++ b/chrome/browser/pdf_unsupported_feature.cc
@@ -136,7 +136,7 @@ void OpenUsingReader(TabContentsWrapper* tab,
InfoBarDelegate* old_delegate,
InfoBarDelegate* new_delegate) {
ChromePluginServiceFilter::GetInstance()->OverridePluginForTab(
- tab->render_view_host()->process()->id(),
+ tab->render_view_host()->process()->GetID(),
tab->render_view_host()->routing_id(),
tab->tab_contents()->GetURL(),
ASCIIToUTF16(PluginGroup::kAdobeReaderGroupName));
@@ -402,6 +402,6 @@ void PDFHasUnsupportedFeature(TabContentsWrapper* tab) {
PluginService::GetInstance()->GetPluginGroups(
base::Bind(&GotPluginGroupsCallback,
- tab->render_view_host()->process()->id(),
+ tab->render_view_host()->process()->GetID(),
tab->render_view_host()->routing_id()));
}
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index d90afd6..0022c7d 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -61,8 +61,8 @@
#include "chrome/browser/web_resource/promo_resource_service.h"
#include "chrome/common/pref_names.h"
#include "content/browser/host_zoom_map.h"
-#include "content/browser/renderer_host/browser_render_process_host.h"
#include "content/browser/ssl/ssl_manager.h"
+#include "content/public/browser/render_process_host.h"
#if defined(OS_MACOSX)
#include "chrome/browser/ui/cocoa/presentation_mode_prefs.h"
diff --git a/chrome/browser/prerender/prerender_contents.cc b/chrome/browser/prerender/prerender_contents.cc
index 3895e06..c8af93b 100644
--- a/chrome/browser/prerender/prerender_contents.cc
+++ b/chrome/browser/prerender/prerender_contents.cc
@@ -282,7 +282,7 @@ void PrerenderContents::StartPrerendering(
render_view_host_observer_.reset(
new PrerenderRenderViewHostObserver(this, render_view_host_mutable()));
- child_id_ = render_view_host()->process()->id();
+ child_id_ = render_view_host()->process()->GetID();
route_id_ = render_view_host()->routing_id();
// Register this with the ResourceDispatcherHost as a prerender
diff --git a/chrome/browser/prerender/prerender_manager.cc b/chrome/browser/prerender/prerender_manager.cc
index 7662832..77cbd0b 100644
--- a/chrome/browser/prerender/prerender_manager.cc
+++ b/chrome/browser/prerender/prerender_manager.cc
@@ -37,7 +37,6 @@
#include "content/browser/cancelable_request.h"
#include "content/browser/debugger/render_view_devtools_agent_host.h"
#include "content/browser/in_process_webkit/session_storage_namespace.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
#include "content/browser/tab_contents/render_view_host_manager.h"
@@ -47,6 +46,7 @@
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_source.h"
+#include "content/public/browser/render_process_host.h"
using content::BrowserThread;
@@ -401,8 +401,8 @@ bool PrerenderManager::AddPrerender(
// true, so that case needs to be explicitly checked for.
// TODO(tburkard): Figure out how to cancel prerendering in the opposite
// case, when a new tab is added to a process used for prerendering.
- if (RenderProcessHost::ShouldTryToUseExistingProcessHost() &&
- !RenderProcessHost::run_renderer_in_process()) {
+ if (content::RenderProcessHost::ShouldTryToUseExistingProcessHost() &&
+ !content::RenderProcessHost::run_renderer_in_process()) {
RecordFinalStatus(origin, experiment, FINAL_STATUS_TOO_MANY_PROCESSES);
return false;
}
@@ -1135,15 +1135,15 @@ void PrerenderManager::RecordFinalStatus(Origin origin,
PrerenderManager* FindPrerenderManagerUsingRenderProcessId(
int render_process_id) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- RenderProcessHost* render_process_host =
- RenderProcessHost::FromID(render_process_id);
+ content::RenderProcessHost* render_process_host =
+ content::RenderProcessHost::FromID(render_process_id);
// Each render process is guaranteed to only hold RenderViews owned by the
// same BrowserContext. This is enforced by
// RenderProcessHost::GetExistingProcessHost.
- if (!render_process_host || !render_process_host->browser_context())
+ if (!render_process_host || !render_process_host->GetBrowserContext())
return NULL;
Profile* profile = Profile::FromBrowserContext(
- render_process_host->browser_context());
+ render_process_host->GetBrowserContext());
if (!profile)
return NULL;
return PrerenderManagerFactory::GetInstance()->GetForProfile(profile);
diff --git a/chrome/browser/printing/background_printing_manager.cc b/chrome/browser/printing/background_printing_manager.cc
index 3310e12..206c04a 100644
--- a/chrome/browser/printing/background_printing_manager.cc
+++ b/chrome/browser/printing/background_printing_manager.cc
@@ -58,12 +58,13 @@ void BackgroundPrintingManager::OwnPrintPreviewTab(
//
// Multiple sites may share the same RenderProcessHost, so check if this
// notification has already been added.
- RenderProcessHost* rph = preview_tab->render_view_host()->process();
+ content::RenderProcessHost* rph = preview_tab->render_view_host()->process();
if (!registrar_.IsRegistered(this,
content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
- content::Source<RenderProcessHost>(rph))) {
+ content::Source<content::RenderProcessHost>(
+ rph))) {
registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
- content::Source<RenderProcessHost>(rph));
+ content::Source<content::RenderProcessHost>(rph));
}
// Activate the initiator tab.
@@ -85,7 +86,8 @@ void BackgroundPrintingManager::Observe(
const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_RENDERER_PROCESS_CLOSED: {
- OnRendererProcessClosed(content::Source<RenderProcessHost>(source).ptr());
+ OnRendererProcessClosed(
+ content::Source<content::RenderProcessHost>(source).ptr());
break;
}
case chrome::NOTIFICATION_PRINT_JOB_RELEASED: {
@@ -106,7 +108,7 @@ void BackgroundPrintingManager::Observe(
}
void BackgroundPrintingManager::OnRendererProcessClosed(
- RenderProcessHost* rph) {
+ content::RenderProcessHost* rph) {
TabContentsWrapperSet preview_tabs_pending_deletion;
TabContentsWrapperSet::const_iterator it;
for (it = begin(); it != end(); ++it) {
@@ -143,9 +145,10 @@ void BackgroundPrintingManager::OnTabContentsDestroyed(
bool shared_rph = HasSharedRenderProcessHost(printing_tabs_, preview_tab) ||
HasSharedRenderProcessHost(printing_tabs_pending_deletion_, preview_tab);
if (!shared_rph) {
- RenderProcessHost* rph = preview_tab->render_view_host()->process();
+ content::RenderProcessHost* rph =
+ preview_tab->render_view_host()->process();
registrar_.Remove(this, content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
- content::Source<RenderProcessHost>(rph));
+ content::Source<content::RenderProcessHost>(rph));
}
// Remove other notifications and remove the tab from its
@@ -171,7 +174,7 @@ void BackgroundPrintingManager::DeletePreviewTab(TabContentsWrapper* tab) {
bool BackgroundPrintingManager::HasSharedRenderProcessHost(
const TabContentsWrapperSet& set,
TabContentsWrapper* tab) {
- RenderProcessHost* rph = tab->render_view_host()->process();
+ content::RenderProcessHost* rph = tab->render_view_host()->process();
for (TabContentsWrapperSet::const_iterator it = set.begin();
it != set.end();
++it) {
diff --git a/chrome/browser/printing/background_printing_manager.h b/chrome/browser/printing/background_printing_manager.h
index 81c2843..4a7e12e 100644
--- a/chrome/browser/printing/background_printing_manager.h
+++ b/chrome/browser/printing/background_printing_manager.h
@@ -14,9 +14,12 @@
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-class RenderProcessHost;
class TabContentsWrapper;
+namespace content {
+class RenderProcessHost;
+}
+
namespace printing {
// Manages hidden tabs that prints documents in the background.
@@ -49,7 +52,7 @@ class BackgroundPrintingManager : public base::NonThreadSafe,
private:
// Notifications handlers.
- void OnRendererProcessClosed(RenderProcessHost* rph);
+ void OnRendererProcessClosed(content::RenderProcessHost* rph);
void OnPrintJobReleased(TabContentsWrapper* preview_tab);
void OnTabContentsDestroyed(TabContentsWrapper* preview_tab);
diff --git a/chrome/browser/printing/print_preview_tab_controller.cc b/chrome/browser/printing/print_preview_tab_controller.cc
index dd57c26..ba6696a 100644
--- a/chrome/browser/printing/print_preview_tab_controller.cc
+++ b/chrome/browser/printing/print_preview_tab_controller.cc
@@ -41,7 +41,7 @@ namespace {
void EnableInternalPDFPluginForTab(TabContentsWrapper* preview_tab) {
// Always enable the internal PDF plugin for the print preview page.
ChromePluginServiceFilter::GetInstance()->OverridePluginForTab(
- preview_tab->render_view_host()->process()->id(),
+ preview_tab->render_view_host()->process()->GetID(),
preview_tab->render_view_host()->routing_id(),
GURL(),
ASCIIToUTF16(chrome::ChromeContentClient::kPDFPluginName));
@@ -196,7 +196,8 @@ void PrintPreviewTabController::Observe(
const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_RENDERER_PROCESS_CLOSED: {
- OnRendererProcessClosed(content::Source<RenderProcessHost>(source).ptr());
+ OnRendererProcessClosed(
+ content::Source<content::RenderProcessHost>(source).ptr());
break;
}
case content::NOTIFICATION_TAB_CONTENTS_DESTROYED: {
@@ -225,7 +226,7 @@ void PrintPreviewTabController::Observe(
}
void PrintPreviewTabController::OnRendererProcessClosed(
- RenderProcessHost* rph) {
+ content::RenderProcessHost* rph) {
// Store tabs in a vector and deal with them after iterating through
// |preview_tab_map_| because RemoveFooTab() can change |preview_tab_map_|.
std::vector<TabContentsWrapper*> closed_initiator_tabs;
@@ -404,12 +405,13 @@ void PrintPreviewTabController::AddObservers(TabContentsWrapper* tab) {
// Multiple sites may share the same RenderProcessHost, so check if this
// notification has already been added.
- RenderProcessHost* rph = tab->render_view_host()->process();
+ content::RenderProcessHost* rph = tab->render_view_host()->process();
if (!registrar_.IsRegistered(this,
content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
- content::Source<RenderProcessHost>(rph))) {
+ content::Source<content::RenderProcessHost>(
+ rph))) {
registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
- content::Source<RenderProcessHost>(rph));
+ content::Source<content::RenderProcessHost>(rph));
}
}
@@ -423,12 +425,13 @@ void PrintPreviewTabController::RemoveObservers(TabContentsWrapper* tab) {
// Multiple sites may share the same RenderProcessHost, so check if this
// notification has already been added.
- RenderProcessHost* rph = tab->render_view_host()->process();
+ content::RenderProcessHost* rph = tab->render_view_host()->process();
if (registrar_.IsRegistered(this,
content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
- content::Source<RenderProcessHost>(rph))) {
+ content::Source<content::RenderProcessHost>(
+ rph))) {
registrar_.Remove(this, content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
- content::Source<RenderProcessHost>(rph));
+ content::Source<content::RenderProcessHost>(rph));
}
}
diff --git a/chrome/browser/printing/print_preview_tab_controller.h b/chrome/browser/printing/print_preview_tab_controller.h
index f4717ae..b5ebb6b 100644
--- a/chrome/browser/printing/print_preview_tab_controller.h
+++ b/chrome/browser/printing/print_preview_tab_controller.h
@@ -21,11 +21,11 @@
#include "content/public/browser/notification_registrar.h"
class GURL;
-class RenderProcessHost;
class TabContentsWrapper;
namespace content {
struct LoadCommittedDetails;
+class RenderProcessHost;
}
namespace printing {
@@ -83,7 +83,7 @@ class PrintPreviewTabController
// Handler for the RENDERER_PROCESS_CLOSED notification. This is observed when
// the initiator renderer crashed.
- void OnRendererProcessClosed(RenderProcessHost* rph);
+ void OnRendererProcessClosed(content::RenderProcessHost* rph);
// Handler for the TAB_CONTENTS_DESTROYED notification. This is observed when
// either tab is closed.
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index c6eb3f6..0de2f77 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -101,12 +101,12 @@
#include "content/browser/file_system/browser_file_system_helper.h"
#include "content/browser/host_zoom_map.h"
#include "content/browser/in_process_webkit/webkit_context.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/speech/speech_input_manager.h"
#include "content/browser/ssl/ssl_host_state.h"
#include "content/browser/user_metrics.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/render_process_host.h"
#include "grit/locale_settings.h"
#include "net/base/transport_security_state.h"
#include "net/http/http_server_properties.h"
@@ -1195,10 +1195,10 @@ void ProfileImpl::ReinitializeSpellCheckHost(bool force) {
GetRequestContext());
if (result == SpellCheckProfile::REINITIALIZE_REMOVED_HOST) {
// The spellchecker has been disabled.
- for (RenderProcessHost::iterator
- i(RenderProcessHost::AllHostsIterator());
+ for (content::RenderProcessHost::iterator i(
+ content::RenderProcessHost::AllHostsIterator());
!i.IsAtEnd(); i.Advance()) {
- RenderProcessHost* process = i.GetCurrentValue();
+ content::RenderProcessHost* process = i.GetCurrentValue();
process->Send(new SpellCheckMsg_Init(IPC::InvalidPlatformFileForTransit(),
std::vector<std::string>(),
std::string(),
@@ -1297,10 +1297,10 @@ void ProfileImpl::Observe(int type,
ReinitializeSpellCheckHost(true);
} else if (*pref_name_in == prefs::kEnableAutoSpellCorrect) {
bool enabled = prefs->GetBoolean(prefs::kEnableAutoSpellCorrect);
- for (RenderProcessHost::iterator
- i(RenderProcessHost::AllHostsIterator());
+ for (content::RenderProcessHost::iterator i(
+ content::RenderProcessHost::AllHostsIterator());
!i.IsAtEnd(); i.Advance()) {
- RenderProcessHost* process = i.GetCurrentValue();
+ content::RenderProcessHost* process = i.GetCurrentValue();
process->Send(new SpellCheckMsg_EnableAutoSpellCorrect(enabled));
}
} else if (*pref_name_in == prefs::kSpeechInputFilterProfanities) {
diff --git a/chrome/browser/renderer_host/chrome_render_message_filter.cc b/chrome/browser/renderer_host/chrome_render_message_filter.cc
index b0ff82f..3a40d60 100644
--- a/chrome/browser/renderer_host/chrome_render_message_filter.cc
+++ b/chrome/browser/renderer_host/chrome_render_message_filter.cc
@@ -30,9 +30,9 @@
#include "chrome/common/render_messages.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/url_constants.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
#include "content/common/child_process_info.h"
+#include "content/public/browser/render_process_host.h"
#include "googleurl/src/gurl.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
@@ -313,7 +313,8 @@ void ChromeRenderMessageFilter::OnGetExtensionMessageBundleOnFileThread(
void ChromeRenderMessageFilter::OnExtensionAddListener(
const std::string& extension_id,
const std::string& event_name) {
- RenderProcessHost* process = RenderProcessHost::FromID(render_process_id_);
+ content::RenderProcessHost* process =
+ content::RenderProcessHost::FromID(render_process_id_);
if (!process || !profile_->GetExtensionEventRouter())
return;
@@ -324,7 +325,8 @@ void ChromeRenderMessageFilter::OnExtensionAddListener(
void ChromeRenderMessageFilter::OnExtensionRemoveListener(
const std::string& extension_id,
const std::string& event_name) {
- RenderProcessHost* process = RenderProcessHost::FromID(render_process_id_);
+ content::RenderProcessHost* process =
+ content::RenderProcessHost::FromID(render_process_id_);
if (!process || !profile_->GetExtensionEventRouter())
return;
@@ -345,7 +347,7 @@ void ChromeRenderMessageFilter::OnExtensionEventAck(
}
void ChromeRenderMessageFilter::OnExtensionCloseChannel(int port_id) {
- if (!RenderProcessHost::FromID(render_process_id_))
+ if (!content::RenderProcessHost::FromID(render_process_id_))
return; // To guard against crash in browser_tests shutdown.
if (profile_->GetExtensionMessageService())
diff --git a/chrome/browser/renderer_host/chrome_render_view_host_observer.cc b/chrome/browser/renderer_host/chrome_render_view_host_observer.cc
index eb0646c..dd59ff4 100644
--- a/chrome/browser/renderer_host/chrome_render_view_host_observer.cc
+++ b/chrome/browser/renderer_host/chrome_render_view_host_observer.cc
@@ -87,7 +87,7 @@ void ChromeRenderViewHostObserver::InitRenderViewHostForExtensions() {
// TODO(aa): Totally lame to store this state in a global map in extension
// service. Can we get it from EPM instead?
profile_->GetExtensionService()->SetInstalledAppForRenderer(
- render_view_host()->process()->id(), extension);
+ render_view_host()->process()->GetID(), extension);
}
}
@@ -96,7 +96,7 @@ void ChromeRenderViewHostObserver::InitRenderViewForExtensions() {
if (!extension)
return;
- RenderProcessHost* process = render_view_host()->process();
+ content::RenderProcessHost* process = render_view_host()->process();
if (extension->is_app()) {
Send(new ExtensionMsg_ActivateApplication(extension->id()));
@@ -105,7 +105,7 @@ void ChromeRenderViewHostObserver::InitRenderViewForExtensions() {
// restarted (hence the re-initialization), so we need to update that
// mapping.
profile_->GetExtensionService()->SetInstalledAppForRenderer(
- process->id(), extension);
+ process->GetID(), extension);
}
// Some extensions use chrome:// URLs.
@@ -113,14 +113,14 @@ void ChromeRenderViewHostObserver::InitRenderViewForExtensions() {
if (type == Extension::TYPE_EXTENSION ||
type == Extension::TYPE_PACKAGED_APP) {
ChildProcessSecurityPolicy::GetInstance()->GrantScheme(
- process->id(), chrome::kChromeUIScheme);
+ process->GetID(), chrome::kChromeUIScheme);
}
if (type == Extension::TYPE_EXTENSION &&
profile_->GetExtensionService()->extension_prefs()->AllowFileAccess(
extension->id())) {
ChildProcessSecurityPolicy::GetInstance()->GrantScheme(
- process->id(), chrome::kFileScheme);
+ process->GetID(), chrome::kFileScheme);
}
if (type == Extension::TYPE_EXTENSION ||
diff --git a/chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc b/chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc
index 1cf4874..4f9d270 100644
--- a/chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc
+++ b/chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc
@@ -10,20 +10,21 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/base/ui_test_utils.h"
-#include "content/browser/renderer_host/render_process_host.h"
+#include "content/browser/renderer_host/render_process_host_impl.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_view_host_delegate.h"
namespace {
RenderViewHost* FindFirstDevToolsHost() {
- RenderProcessHost::iterator hosts = RenderProcessHost::AllHostsIterator();
+ content::RenderProcessHost::iterator hosts =
+ content::RenderProcessHost::AllHostsIterator();
for (; !hosts.IsAtEnd(); hosts.Advance()) {
- RenderProcessHost* render_process_host = hosts.GetCurrentValue();
+ content::RenderProcessHost* render_process_host = hosts.GetCurrentValue();
DCHECK(render_process_host);
if (!render_process_host->HasConnection())
continue;
- RenderProcessHost::listeners_iterator iter(
+ content::RenderProcessHost::listeners_iterator iter(
render_process_host->ListenersIterator());
for (; !iter.IsAtEnd(); iter.Advance()) {
const RenderWidgetHost* widget =
diff --git a/chrome/browser/renderer_host/web_cache_manager.cc b/chrome/browser/renderer_host/web_cache_manager.cc
index 605a1b4..02bf510 100644
--- a/chrome/browser/renderer_host/web_cache_manager.cc
+++ b/chrome/browser/renderer_host/web_cache_manager.cc
@@ -19,8 +19,8 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/render_messages.h"
-#include "content/browser/renderer_host/browser_render_process_host.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/render_process_host.h"
using base::Time;
using base::TimeDelta;
@@ -163,15 +163,15 @@ void WebCacheManager::Observe(int type,
const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_RENDERER_PROCESS_CREATED: {
- RenderProcessHost* process =
- content::Source<RenderProcessHost>(source).ptr();
- Add(process->id());
+ content::RenderProcessHost* process =
+ content::Source<content::RenderProcessHost>(source).ptr();
+ Add(process->GetID());
break;
}
case content::NOTIFICATION_RENDERER_PROCESS_TERMINATED: {
- RenderProcessHost* process =
- content::Source<RenderProcessHost>(source).ptr();
- Remove(process->id());
+ content::RenderProcessHost* process =
+ content::Source<content::RenderProcessHost>(source).ptr();
+ Remove(process->GetID());
break;
}
default:
@@ -308,7 +308,8 @@ void WebCacheManager::EnactStrategy(const AllocationStrategy& strategy) {
// Inform each render process of its cache allocation.
AllocationStrategy::const_iterator allocation = strategy.begin();
while (allocation != strategy.end()) {
- RenderProcessHost* host = RenderProcessHost::FromID(allocation->first);
+ content::RenderProcessHost* host =
+ content::RenderProcessHost::FromID(allocation->first);
if (host) {
// This is the capacity this renderer has been allocated.
size_t capacity = allocation->second;
@@ -336,7 +337,8 @@ void WebCacheManager::ClearRendederCache(
WebCacheManager::ClearCacheOccasion occasion) {
std::set<int>::const_iterator iter = renderers.begin();
for (; iter != renderers.end(); ++iter) {
- RenderProcessHost* host = RenderProcessHost::FromID(*iter);
+ content::RenderProcessHost* host =
+ content::RenderProcessHost::FromID(*iter);
if (host)
host->Send(new ChromeViewMsg_ClearCache(occasion == ON_NAVIGATION));
}
diff --git a/chrome/browser/renderer_host/web_cache_manager_browsertest.cc b/chrome/browser/renderer_host/web_cache_manager_browsertest.cc
index f949f7d..1f1cac1 100644
--- a/chrome/browser/renderer_host/web_cache_manager_browsertest.cc
+++ b/chrome/browser/renderer_host/web_cache_manager_browsertest.cc
@@ -10,7 +10,7 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
-#include "content/browser/renderer_host/render_process_host.h"
+#include "content/browser/renderer_host/render_process_host_impl.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/common/result_codes.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/safe_browsing/client_side_detection_host.cc b/chrome/browser/safe_browsing/client_side_detection_host.cc
index 0bf18a8..d3edca3 100644
--- a/chrome/browser/safe_browsing/client_side_detection_host.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_host.cc
@@ -21,7 +21,6 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/safe_browsing/csd.pb.h"
#include "chrome/common/safe_browsing/safebrowsing_messages.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_view_host_delegate.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
@@ -33,6 +32,7 @@
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/render_process_host.h"
#include "googleurl/src/gurl.h"
using content::BrowserThread;
@@ -343,7 +343,7 @@ void ClientSideDetectionHost::OnSafeBrowsingHit(
// either a malware or phishing hit. In this case we store the unique page
// ID for later.
if (tab_contents() &&
- tab_contents()->GetRenderProcessHost()->id() ==
+ tab_contents()->GetRenderProcessHost()->GetID() ==
resource.render_process_host_id &&
tab_contents()->render_view_host()->routing_id() ==
resource.render_view_id &&
@@ -421,7 +421,7 @@ void ClientSideDetectionHost::MaybeShowPhishingWarning(GURL phishing_url,
resource.is_subresource = false;
resource.threat_type = SafeBrowsingService::CLIENT_SIDE_PHISHING_URL;
resource.render_process_host_id =
- tab_contents()->GetRenderProcessHost()->id();
+ tab_contents()->GetRenderProcessHost()->GetID();
resource.render_view_id =
tab_contents()->render_view_host()->routing_id();
if (!sb_service_->IsWhitelisted(resource)) {
diff --git a/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc b/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc
index 82d9429..c9d64db 100644
--- a/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc
@@ -265,7 +265,8 @@ class ClientSideDetectionHostTest : public TabContentsWrapperTestHarness {
virtual ~BogusClient() {}
};
resource.client = new BogusClient();
- resource.render_process_host_id = contents()->GetRenderProcessHost()->id();
+ resource.render_process_host_id = contents()->GetRenderProcessHost()->
+ GetID();
resource.render_view_id = contents()->render_view_host()->routing_id();
csd_host_->OnSafeBrowsingHit(resource);
delete resource.client;
@@ -412,7 +413,7 @@ TEST_F(ClientSideDetectionHostTest, OnPhishingDetectionDoneShowInterstitial) {
EXPECT_FALSE(resource.is_subresource);
EXPECT_EQ(SafeBrowsingService::CLIENT_SIDE_PHISHING_URL,
resource.threat_type);
- EXPECT_EQ(contents()->GetRenderProcessHost()->id(),
+ EXPECT_EQ(contents()->GetRenderProcessHost()->GetID(),
resource.render_process_host_id);
EXPECT_EQ(contents()->render_view_host()->routing_id(),
resource.render_view_id);
@@ -508,7 +509,7 @@ TEST_F(ClientSideDetectionHostTest, OnPhishingDetectionDoneMultiplePings) {
EXPECT_FALSE(resource.is_subresource);
EXPECT_EQ(SafeBrowsingService::CLIENT_SIDE_PHISHING_URL,
resource.threat_type);
- EXPECT_EQ(contents()->GetRenderProcessHost()->id(),
+ EXPECT_EQ(contents()->GetRenderProcessHost()->GetID(),
resource.render_process_host_id);
EXPECT_EQ(contents()->render_view_host()->routing_id(),
resource.render_view_id);
diff --git a/chrome/browser/safe_browsing/client_side_detection_service.cc b/chrome/browser/safe_browsing/client_side_detection_service.cc
index f92cca5..ab94663 100644
--- a/chrome/browser/safe_browsing/client_side_detection_service.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_service.cc
@@ -24,10 +24,10 @@
#include "chrome/common/safe_browsing/client_model.pb.h"
#include "chrome/common/safe_browsing/csd.pb.h"
#include "chrome/common/safe_browsing/safebrowsing_messages.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/render_process_host.h"
#include "content/public/common/url_fetcher.h"
#include "crypto/sha2.h"
#include "googleurl/src/gurl.h"
@@ -214,15 +214,16 @@ void ClientSideDetectionService::Observe(
// Model might not be ready or maybe there was an error.
return;
}
- SendModelToProcess(content::Source<RenderProcessHost>(source).ptr());
+ SendModelToProcess(
+ content::Source<content::RenderProcessHost>(source).ptr());
}
void ClientSideDetectionService::SendModelToProcess(
- RenderProcessHost* process) {
+ content::RenderProcessHost* process) {
// The ClientSideDetectionService is enabled if _any_ active profile has
// SafeBrowsing turned on. Here we check the profile for each renderer
// process and only send the model to those that have SafeBrowsing enabled.
- Profile* profile = Profile::FromBrowserContext(process->browser_context());
+ Profile* profile = Profile::FromBrowserContext(process->GetBrowserContext());
std::string model;
if (profile->GetPrefs()->GetBoolean(prefs::kSafeBrowsingEnabled)) {
VLOG(2) << "Sending phishing model to RenderProcessHost @" << process;
@@ -235,7 +236,8 @@ void ClientSideDetectionService::SendModelToProcess(
}
void ClientSideDetectionService::SendModelToRenderers() {
- for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator());
+ for (content::RenderProcessHost::iterator i(
+ content::RenderProcessHost::AllHostsIterator());
!i.IsAtEnd(); i.Advance()) {
SendModelToProcess(i.GetCurrentValue());
}
diff --git a/chrome/browser/safe_browsing/client_side_detection_service.h b/chrome/browser/safe_browsing/client_side_detection_service.h
index 7ca7566..a41a710 100644
--- a/chrome/browser/safe_browsing/client_side_detection_service.h
+++ b/chrome/browser/safe_browsing/client_side_detection_service.h
@@ -35,13 +35,16 @@
#include "googleurl/src/gurl.h"
#include "net/base/net_util.h"
-class RenderProcessHost;
class SafeBrowsingService;
namespace base {
class TimeDelta;
}
+namespace content {
+class RenderProcessHost;
+}
+
namespace net {
class URLRequestContextGetter;
class URLRequestStatus;
@@ -234,7 +237,7 @@ class ClientSideDetectionService : public content::URLFetcherDelegate,
bool InitializePrivateNetworks();
// Send the model to the given renderer.
- void SendModelToProcess(RenderProcessHost* process);
+ void SendModelToProcess(content::RenderProcessHost* process);
// Same as above but sends the model to all rendereres.
void SendModelToRenderers();
diff --git a/chrome/browser/safe_browsing/malware_details_unittest.cc b/chrome/browser/safe_browsing/malware_details_unittest.cc
index 024fe9c..0731980 100644
--- a/chrome/browser/safe_browsing/malware_details_unittest.cc
+++ b/chrome/browser/safe_browsing/malware_details_unittest.cc
@@ -217,7 +217,8 @@ class MalwareDetailsTest : public ChromeRenderViewHostTestHarness {
resource->url = url;
resource->is_subresource = is_subresource;
resource->threat_type = SafeBrowsingService::URL_MALWARE;
- resource->render_process_host_id = contents()->GetRenderProcessHost()->id();
+ resource->render_process_host_id = contents()->GetRenderProcessHost()->
+ GetID();
resource->render_view_id = contents()->render_view_host()->routing_id();
}
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc
index 12f10a4..c398aa1 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc
@@ -171,7 +171,8 @@ class SafeBrowsingBlockingPageTest : public ChromeRenderViewHostTestHarness,
resource->url = url;
resource->is_subresource = is_subresource;
resource->threat_type = SafeBrowsingService::URL_MALWARE;
- resource->render_process_host_id = contents()->GetRenderProcessHost()->id();
+ resource->render_process_host_id = contents()->GetRenderProcessHost()->
+ GetID();
resource->render_view_id = contents()->render_view_host()->routing_id();
}
diff --git a/chrome/browser/search_engines/search_provider_install_state_message_filter.cc b/chrome/browser/search_engines/search_provider_install_state_message_filter.cc
index c961c01..1b1701a 100644
--- a/chrome/browser/search_engines/search_provider_install_state_message_filter.cc
+++ b/chrome/browser/search_engines/search_provider_install_state_message_filter.cc
@@ -8,10 +8,10 @@
#include "base/logging.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/render_messages.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/render_process_host.h"
#include "googleurl/src/gurl.h"
using content::BrowserThread;
@@ -23,10 +23,11 @@ SearchProviderInstallStateMessageFilter(
: ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)),
provider_data_(profile->GetWebDataService(Profile::EXPLICIT_ACCESS),
content::NOTIFICATION_RENDERER_PROCESS_TERMINATED,
- content::Source<RenderProcessHost>(
- RenderProcessHost::FromID(render_process_id))),
+ content::Source<content::RenderProcessHost>(
+ content::RenderProcessHost::FromID(
+ render_process_id))),
is_off_the_record_(profile->IsOffTheRecord()) {
- // This is initialized by BrowserRenderProcessHost. Do not add any non-trivial
+ // This is initialized by RenderProcessHostImpl. Do not add any non-trivial
// initialization here. Instead do it lazily when required.
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
}
diff --git a/chrome/browser/sidebar/sidebar_container.cc b/chrome/browser/sidebar/sidebar_container.cc
index d428971..4467006 100644
--- a/chrome/browser/sidebar/sidebar_container.cc
+++ b/chrome/browser/sidebar/sidebar_container.cc
@@ -11,12 +11,12 @@
#include "chrome/common/extensions/extension_resource.h"
#include "chrome/common/extensions/extension_sidebar_defaults.h"
#include "chrome/common/extensions/extension_sidebar_utils.h"
-#include "content/browser/renderer_host/browser_render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
+#include "content/public/browser/render_process_host.h"
#include "googleurl/src/gurl.h"
#include "third_party/skia/include/core/SkBitmap.h"
diff --git a/chrome/browser/spellchecker/spellcheck_host.h b/chrome/browser/spellchecker/spellcheck_host.h
index a439aa3..38daccd 100644
--- a/chrome/browser/spellchecker/spellcheck_host.h
+++ b/chrome/browser/spellchecker/spellcheck_host.h
@@ -18,8 +18,11 @@ namespace base {
class WaitableEvent;
}
-class Profile;
+namespace content {
class RenderProcessHost;
+}
+
+class Profile;
class SpellCheckHostMetrics;
class SpellCheckProfileProvider;
@@ -72,7 +75,7 @@ class SpellCheckHost {
// Pass the renderer some basic intialization information. Note that the
// renderer will not load Hunspell until it needs to.
- virtual void InitForRenderer(RenderProcessHost* process) = 0;
+ virtual void InitForRenderer(content::RenderProcessHost* process) = 0;
// Adds the given word to the custom words list and inform renderer of the
// update.
diff --git a/chrome/browser/spellchecker/spellcheck_host_impl.cc b/chrome/browser/spellchecker/spellcheck_host_impl.cc
index c0cd19b..2c2d923 100644
--- a/chrome/browser/spellchecker/spellcheck_host_impl.cc
+++ b/chrome/browser/spellchecker/spellcheck_host_impl.cc
@@ -23,9 +23,9 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/spellcheck_common.h"
#include "chrome/common/spellcheck_messages.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/render_process_host.h"
#include "content/public/common/url_fetcher.h"
#include "googleurl/src/gurl.h"
#include "net/url_request/url_request_context_getter.h"
@@ -162,12 +162,12 @@ void SpellCheckHostImpl::UnsetProfile() {
registrar_.RemoveAll();
}
-void SpellCheckHostImpl::InitForRenderer(RenderProcessHost* process) {
+void SpellCheckHostImpl::InitForRenderer(content::RenderProcessHost* process) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
// Bug 103693: SpellCheckHostImpl and SpellCheckProfile should not
// depend on Profile interface.
- Profile* profile = Profile::FromBrowserContext(process->browser_context());
+ Profile* profile = Profile::FromBrowserContext(process->GetBrowserContext());
if (profile->GetSpellCheckHost() != this)
return;
@@ -290,9 +290,10 @@ void SpellCheckHostImpl::InformProfileOfInitializationWithCustomWords(
if (profile_)
profile_->SpellCheckHostInitialized(custom_words);
- for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator());
+ for (content::RenderProcessHost::iterator i(
+ content::RenderProcessHost::AllHostsIterator());
!i.IsAtEnd(); i.Advance()) {
- RenderProcessHost* process = i.GetCurrentValue();
+ content::RenderProcessHost* process = i.GetCurrentValue();
if (process)
InitForRenderer(process);
}
@@ -384,7 +385,8 @@ void SpellCheckHostImpl::Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
DCHECK(type == content::NOTIFICATION_RENDERER_PROCESS_CREATED);
- RenderProcessHost* process = content::Source<RenderProcessHost>(source).ptr();
+ content::RenderProcessHost* process =
+ content::Source<content::RenderProcessHost>(source).ptr();
InitForRenderer(process);
}
@@ -478,7 +480,8 @@ bool SpellCheckHostImpl::IsUsingPlatformChecker() const {
void SpellCheckHostImpl::AddWordComplete(const std::string& word) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator());
+ for (content::RenderProcessHost::iterator i(
+ content::RenderProcessHost::AllHostsIterator());
!i.IsAtEnd(); i.Advance()) {
i.GetCurrentValue()->Send(new SpellCheckMsg_WordAdded(word));
}
diff --git a/chrome/browser/spellchecker/spellcheck_host_impl.h b/chrome/browser/spellchecker/spellcheck_host_impl.h
index 758a821..4ff371d 100644
--- a/chrome/browser/spellchecker/spellcheck_host_impl.h
+++ b/chrome/browser/spellchecker/spellcheck_host_impl.h
@@ -54,7 +54,7 @@ class SpellCheckHostImpl : public SpellCheckHost,
// SpellCheckHost implementation
virtual void UnsetProfile() OVERRIDE;
- virtual void InitForRenderer(RenderProcessHost* process) OVERRIDE;
+ virtual void InitForRenderer(content::RenderProcessHost* process) OVERRIDE;
virtual void AddWord(const std::string& word) OVERRIDE;
virtual const base::PlatformFile& GetDictionaryFile() const OVERRIDE;
virtual const std::string& GetLanguage() const OVERRIDE;
diff --git a/chrome/browser/spellchecker/spellcheck_message_filter.cc b/chrome/browser/spellchecker/spellcheck_message_filter.cc
index 26cec72..622995e 100644
--- a/chrome/browser/spellchecker/spellcheck_message_filter.cc
+++ b/chrome/browser/spellchecker/spellcheck_message_filter.cc
@@ -10,7 +10,7 @@
#include "chrome/browser/spellchecker/spellcheck_host_metrics.h"
#include "chrome/browser/spellchecker/spellchecker_platform_engine.h"
#include "chrome/common/spellcheck_messages.h"
-#include "content/browser/renderer_host/render_process_host.h"
+#include "content/public/browser/render_process_host.h"
using content::BrowserThread;
@@ -93,10 +93,11 @@ void SpellCheckMessageFilter::OnPlatformRequestTextCheck(
}
void SpellCheckMessageFilter::OnSpellCheckerRequestDictionary() {
- RenderProcessHost* host = RenderProcessHost::FromID(render_process_id_);
+ content::RenderProcessHost* host =
+ content::RenderProcessHost::FromID(render_process_id_);
if (!host)
return; // Teardown.
- Profile* profile = Profile::FromBrowserContext(host->browser_context());
+ Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext());
// The renderer has requested that we initialize its spellchecker. This should
// generally only be called once per session, as after the first call, all
// future renderers will be passed the initialization information on startup
@@ -115,11 +116,12 @@ void SpellCheckMessageFilter::OnSpellCheckerRequestDictionary() {
void SpellCheckMessageFilter::OnNotifyChecked(const string16& word,
bool misspelled) {
- RenderProcessHost* host = RenderProcessHost::FromID(render_process_id_);
+ content::RenderProcessHost* host =
+ content::RenderProcessHost::FromID(render_process_id_);
if (!host)
return; // Teardown.
// Delegates to SpellCheckHost which tracks the stats of our spellchecker.
- Profile* profile = Profile::FromBrowserContext(host->browser_context());
+ Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext());
SpellCheckHost* spellcheck_host = profile->GetSpellCheckHost();
if (spellcheck_host && spellcheck_host->GetMetrics())
spellcheck_host->GetMetrics()->RecordCheckedWordStats(word, misspelled);
diff --git a/chrome/browser/spellchecker/spellcheck_profile_unittest.cc b/chrome/browser/spellchecker/spellcheck_profile_unittest.cc
index f82f0a9..fc4b53d 100644
--- a/chrome/browser/spellchecker/spellcheck_profile_unittest.cc
+++ b/chrome/browser/spellchecker/spellcheck_profile_unittest.cc
@@ -18,7 +18,7 @@ namespace {
class MockSpellCheckHost : public SpellCheckHost {
public:
MOCK_METHOD0(UnsetProfile, void());
- MOCK_METHOD1(InitForRenderer, void(RenderProcessHost* process));
+ MOCK_METHOD1(InitForRenderer, void(content::RenderProcessHost* process));
MOCK_METHOD1(AddWord, void(const std::string& word));
MOCK_CONST_METHOD0(GetDictionaryFile, const base::PlatformFile&());
MOCK_CONST_METHOD0(GetCustomWords,
diff --git a/chrome/browser/ssl/ssl_blocking_page.cc b/chrome/browser/ssl/ssl_blocking_page.cc
index 4cda4bf..07f285e 100644
--- a/chrome/browser/ssl/ssl_blocking_page.cc
+++ b/chrome/browser/ssl/ssl_blocking_page.cc
@@ -108,7 +108,7 @@ std::string SSLBlockingPage::GetHTMLContents() {
void SSLBlockingPage::UpdateEntry(NavigationEntry* entry) {
const net::SSLInfo& ssl_info = handler_->ssl_info();
int cert_id = CertStore::GetInstance()->StoreCert(
- ssl_info.cert, tab()->render_view_host()->process()->id());
+ ssl_info.cert, tab()->render_view_host()->process()->GetID());
entry->ssl().set_security_style(
content::SECURITY_STYLE_AUTHENTICATION_BROKEN);
diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
index 1f66777..704c22a 100644
--- a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
+++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
@@ -31,7 +31,6 @@
#include "content/browser/gpu/gpu_data_manager.h"
#include "content/browser/gpu/gpu_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_widget_fullscreen_host.h"
#include "content/browser/renderer_host/render_widget_host.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
@@ -42,6 +41,7 @@
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/browser/webui/web_ui.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/render_process_host.h"
#include "content/common/view_messages.h"
#include "net/base/network_change_notifier.h"
@@ -118,7 +118,7 @@ RenderViewHostDelegateViewHelper::MaybeCreateBackgroundContents(
// Ensure that we're trying to open this from the extension's process.
extensions::ProcessMap* process_map = extensions_service->process_map();
if (!site->GetProcess() ||
- !process_map->Contains(extension->id(), site->GetProcess()->id())) {
+ !process_map->Contains(extension->id(), site->GetProcess()->GetID())) {
return NULL;
}
@@ -189,7 +189,8 @@ TabContents* RenderViewHostDelegateViewHelper::CreateNewWindow(
}
RenderWidgetHostView* RenderViewHostDelegateViewHelper::CreateNewWidget(
- int route_id, WebKit::WebPopupType popup_type, RenderProcessHost* process) {
+ int route_id, WebKit::WebPopupType popup_type,
+ content::RenderProcessHost* process) {
RenderWidgetHost* widget_host =
new RenderWidgetHost(process, route_id);
RenderWidgetHostView* widget_view =
@@ -203,7 +204,7 @@ RenderWidgetHostView* RenderViewHostDelegateViewHelper::CreateNewWidget(
RenderWidgetHostView*
RenderViewHostDelegateViewHelper::CreateNewFullscreenWidget(
- int route_id, RenderProcessHost* process) {
+ int route_id, content::RenderProcessHost* process) {
RenderWidgetFullscreenHost* fullscreen_widget_host =
new RenderWidgetFullscreenHost(process, route_id);
RenderWidgetHostView* widget_view =
@@ -334,7 +335,7 @@ RenderWidgetHostView*
WebPreferences RenderViewHostDelegateHelper::GetWebkitPrefs(
RenderViewHost* rvh) {
Profile* profile = Profile::FromBrowserContext(
- rvh->process()->browser_context());
+ rvh->process()->GetBrowserContext());
PrefService* prefs = profile->GetPrefs();
WebPreferences web_prefs;
@@ -538,7 +539,7 @@ WebPreferences RenderViewHostDelegateHelper::GetWebkitPrefs(
DCHECK(!web_prefs.default_encoding.empty());
if (ChildProcessSecurityPolicy::GetInstance()->HasWebUIBindings(
- rvh->process()->id())) {
+ rvh->process()->GetID())) {
web_prefs.loads_images_automatically = true;
web_prefs.javascript_enabled = true;
}
diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.h b/chrome/browser/tab_contents/render_view_host_delegate_helper.h
index 0ebc16a..4c9ec02 100644
--- a/chrome/browser/tab_contents/render_view_host_delegate_helper.h
+++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.h
@@ -20,7 +20,6 @@
class BackgroundContents;
class Profile;
-class RenderProcessHost;
class RenderViewHost;
class RenderViewHostDelegate;
class RenderWidgetHost;
@@ -31,6 +30,7 @@ struct ViewHostMsg_CreateWindow_Params;
namespace content {
class BrowserContext;
+class RenderProcessHost;
}
// Provides helper methods that provide common implementations of some
@@ -57,10 +57,10 @@ class RenderViewHostDelegateViewHelper : public content::NotificationObserver {
// GetCreatedWidget.
RenderWidgetHostView* CreateNewWidget(int route_id,
WebKit::WebPopupType popup_type,
- RenderProcessHost* process);
+ content::RenderProcessHost* process);
RenderWidgetHostView* CreateNewFullscreenWidget(
- int route_id, RenderProcessHost* process);
+ int route_id, content::RenderProcessHost* process);
// Finds the new RenderWidgetHost and returns it. Note that this can only be
// called once as this call also removes it from the internal map.
diff --git a/chrome/browser/tabs/tab_strip_model.cc b/chrome/browser/tabs/tab_strip_model.cc
index 5eca928..c9731b1 100644
--- a/chrome/browser/tabs/tab_strip_model.cc
+++ b/chrome/browser/tabs/tab_strip_model.cc
@@ -25,13 +25,13 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/url_constants.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/browser/user_metrics.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/render_process_host.h"
namespace {
@@ -1139,12 +1139,12 @@ bool TabStripModel::InternalCloseTabs(const std::vector<int>& in_indices,
if (browser_shutdown::GetShutdownType() == browser_shutdown::NOT_VALID) {
// Construct a map of processes to the number of associated tabs that are
// closing.
- std::map<RenderProcessHost*, size_t> processes;
+ std::map<content::RenderProcessHost*, size_t> processes;
for (size_t i = 0; i < indices.size(); ++i) {
TabContentsWrapper* detached_contents = GetContentsAt(indices[i]);
- RenderProcessHost* process =
+ content::RenderProcessHost* process =
detached_contents->tab_contents()->GetRenderProcessHost();
- std::map<RenderProcessHost*, size_t>::iterator iter =
+ std::map<content::RenderProcessHost*, size_t>::iterator iter =
processes.find(process);
if (iter == processes.end()) {
processes[process] = 1;
@@ -1154,7 +1154,7 @@ bool TabStripModel::InternalCloseTabs(const std::vector<int>& in_indices,
}
// Try to fast shutdown the tabs that can close.
- for (std::map<RenderProcessHost*, size_t>::iterator iter =
+ for (std::map<content::RenderProcessHost*, size_t>::iterator iter =
processes.begin();
iter != processes.end(); ++iter) {
iter->first->FastShutdownForPageCount(iter->second);
diff --git a/chrome/browser/tabs/tab_strip_model_unittest.cc b/chrome/browser/tabs/tab_strip_model_unittest.cc
index 635097c..9267058 100644
--- a/chrome/browser/tabs/tab_strip_model_unittest.cc
+++ b/chrome/browser/tabs/tab_strip_model_unittest.cc
@@ -1747,7 +1747,7 @@ TEST_F(TabStripModelTest, FastShutdown) {
// On a mock RPH this checks whether we *attempted* fast shutdown.
// A real RPH would reject our attempt since there is an unload handler.
EXPECT_TRUE(contents1->tab_contents()->
- GetRenderProcessHost()->fast_shutdown_started());
+ GetRenderProcessHost()->FastShutdownStarted());
EXPECT_EQ(2, tabstrip.count());
delegate.set_run_unload_listener(false);
@@ -1770,7 +1770,7 @@ TEST_F(TabStripModelTest, FastShutdown) {
tabstrip.CloseTabContentsAt(1, TabStripModel::CLOSE_NONE);
EXPECT_FALSE(contents1->tab_contents()->
- GetRenderProcessHost()->fast_shutdown_started());
+ GetRenderProcessHost()->FastShutdownStarted());
EXPECT_EQ(1, tabstrip.count());
tabstrip.CloseAllTabs();
diff --git a/chrome/browser/task_manager/task_manager_notification_resource_provider.cc b/chrome/browser/task_manager/task_manager_notification_resource_provider.cc
index 2db029f..ae5b401 100644
--- a/chrome/browser/task_manager/task_manager_notification_resource_provider.cc
+++ b/chrome/browser/task_manager/task_manager_notification_resource_provider.cc
@@ -12,10 +12,10 @@
#include "chrome/browser/notifications/balloon_host.h"
#include "chrome/browser/notifications/notification_ui_manager.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/render_process_host.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
diff --git a/chrome/browser/task_manager/task_manager_resource_providers.cc b/chrome/browser/task_manager/task_manager_resource_providers.cc
index 24f1644..42e0fc1 100644
--- a/chrome/browser/task_manager/task_manager_resource_providers.cc
+++ b/chrome/browser/task_manager/task_manager_resource_providers.cc
@@ -42,11 +42,11 @@
#include "chrome/common/url_constants.h"
#include "content/browser/browser_child_process_host.h"
#include "content/browser/renderer_host/render_message_filter.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/render_process_host.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
@@ -272,7 +272,7 @@ string16 TaskManagerTabContentsResource::GetTitle() const {
tab_contents_->profile()->GetExtensionService();
extensions::ProcessMap* process_map = extension_service->process_map();
bool is_app = extension_service->IsInstalledApp(url) &&
- process_map->Contains(contents->GetRenderProcessHost()->id());
+ process_map->Contains(contents->GetRenderProcessHost()->GetID());
int message_id = GetMessagePrefixID(
is_app,
@@ -567,8 +567,8 @@ TaskManagerBackgroundContentsResourceProvider::GetResource(
for (Resources::iterator i = resources_.begin(); i != resources_.end(); i++) {
TabContents* tab = i->first->tab_contents();
- if (tab->render_view_host()->process()->id() == render_process_host_id &&
- tab->render_view_host()->routing_id() == routing_id) {
+ if (tab->render_view_host()->process()->GetID() == render_process_host_id
+ && tab->render_view_host()->routing_id() == routing_id) {
return i->second;
}
}
diff --git a/chrome/browser/translate/translate_manager.cc b/chrome/browser/translate/translate_manager.cc
index ad4cbc4..502d70a 100644
--- a/chrome/browser/translate/translate_manager.cc
+++ b/chrome/browser/translate/translate_manager.cc
@@ -293,7 +293,8 @@ void TranslateManager::Observe(int type,
base::Bind(
&TranslateManager::InitiateTranslationPosted,
weak_method_factory_.GetWeakPtr(),
- controller->tab_contents()->render_view_host()->process()->id(),
+ controller->tab_contents()->render_view_host()->process()->
+ GetID(),
controller->tab_contents()->render_view_host()->routing_id(),
helper->language_state().original_language()));
break;
@@ -572,7 +573,7 @@ void TranslateManager::TranslatePage(TabContents* tab_contents,
// script. Once it is downloaded we'll do the translate.
RenderViewHost* rvh = tab_contents->render_view_host();
PendingRequest request;
- request.render_process_id = rvh->process()->id();
+ request.render_process_id = rvh->process()->GetID();
request.render_view_id = rvh->routing_id();
request.page_id = entry->page_id();
request.source_lang = source_lang;
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index ea340c7..4c52ac1 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -2506,7 +2506,7 @@ void Browser::EnumerateDirectoryHelper(TabContents* tab, int request_id,
const FilePath& path) {
ChildProcessSecurityPolicy* policy =
ChildProcessSecurityPolicy::GetInstance();
- if (!policy->CanReadDirectory(tab->render_view_host()->process()->id(),
+ if (!policy->CanReadDirectory(tab->render_view_host()->process()->GetID(),
path)) {
return;
}
diff --git a/chrome/browser/ui/browser_browsertest.cc b/chrome/browser/ui/browser_browsertest.cc
index 135c0c2..c2d035e 100644
--- a/chrome/browser/ui/browser_browsertest.cc
+++ b/chrome/browser/ui/browser_browsertest.cc
@@ -39,7 +39,7 @@
#include "chrome/common/url_constants.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
-#include "content/browser/renderer_host/render_process_host.h"
+#include "content/browser/renderer_host/render_process_host_impl.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_service.h"
@@ -98,7 +98,8 @@ std::wstring WindowCaptionFromPageTitle(std::wstring page_title) {
// Returns the number of active RenderProcessHosts.
int CountRenderProcessHosts() {
int result = 0;
- for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator());
+ for (content::RenderProcessHost::iterator i(
+ content::RenderProcessHost::AllHostsIterator());
!i.IsAtEnd(); i.Advance())
++result;
return result;
@@ -371,7 +372,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, NullOpenerRedirectForksProcess) {
// Start with an http URL.
ui_test_utils::NavigateToURL(browser(), http_url);
TabContents* oldtab = browser()->GetSelectedTabContents();
- RenderProcessHost* process = oldtab->render_view_host()->process();
+ content::RenderProcessHost* process = oldtab->render_view_host()->process();
// Now open a tab to a blank page, set its opener to null, and redirect it
// cross-site.
@@ -402,7 +403,8 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, NullOpenerRedirectForksProcess) {
newtab->controller().GetLastCommittedEntry()->url().spec());
// Popup window should not be in the opener's process.
- RenderProcessHost* popup_process = newtab->render_view_host()->process();
+ content::RenderProcessHost* popup_process =
+ newtab->render_view_host()->process();
EXPECT_NE(process, popup_process);
// Now open a tab to a blank page, set its opener to null, and use a
@@ -435,7 +437,8 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, NullOpenerRedirectForksProcess) {
newtab2->controller().GetLastCommittedEntry()->url().spec());
// This popup window should also not be in the opener's process.
- RenderProcessHost* popup_process2 = newtab2->render_view_host()->process();
+ content::RenderProcessHost* popup_process2 =
+ newtab2->render_view_host()->process();
EXPECT_NE(process, popup_process2);
}
@@ -457,7 +460,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, OtherRedirectsDontForkProcess) {
// Start with an http URL.
ui_test_utils::NavigateToURL(browser(), http_url);
TabContents* oldtab = browser()->GetSelectedTabContents();
- RenderProcessHost* process = oldtab->render_view_host()->process();
+ content::RenderProcessHost* process = oldtab->render_view_host()->process();
// Now open a tab to a blank page, set its opener to null, and redirect it
// cross-site.
@@ -487,7 +490,8 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, OtherRedirectsDontForkProcess) {
newtab->controller().GetLastCommittedEntry()->url().spec());
// Popup window should still be in the opener's process.
- RenderProcessHost* popup_process = newtab->render_view_host()->process();
+ content::RenderProcessHost* popup_process =
+ newtab->render_view_host()->process();
EXPECT_EQ(process, popup_process);
// Same thing if the current tab tries to navigate itself.
@@ -506,7 +510,8 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, OtherRedirectsDontForkProcess) {
oldtab->controller().GetLastCommittedEntry()->url().spec());
// Original window should still be in the original process.
- RenderProcessHost* new_process = newtab->render_view_host()->process();
+ content::RenderProcessHost* new_process =
+ newtab->render_view_host()->process();
EXPECT_EQ(process, new_process);
}
@@ -517,10 +522,11 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, RenderIdleTime) {
ui_test_utils::NavigateToURL(browser(),
ui_test_utils::GetTestUrl(FilePath(FilePath::kCurrentDirectory),
FilePath(kTitle1File)));
- RenderProcessHost::iterator it(RenderProcessHost::AllHostsIterator());
+ content::RenderProcessHost::iterator it(
+ content::RenderProcessHost::AllHostsIterator());
for (; !it.IsAtEnd(); it.Advance()) {
base::TimeDelta renderer_td =
- it.GetCurrentValue()->get_child_process_idle_time();
+ it.GetCurrentValue()->GetChildProcessIdleTime();
base::TimeDelta browser_td = base::TimeTicks::Now() - start;
EXPECT_TRUE(browser_td >= renderer_td);
}
diff --git a/chrome/browser/ui/browser_list.cc b/chrome/browser/ui/browser_list.cc
index ea4f60d..52ac775 100644
--- a/chrome/browser/ui/browser_list.cc
+++ b/chrome/browser/ui/browser_list.cc
@@ -19,10 +19,10 @@
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/tab_contents/navigation_details.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/render_process_host.h"
#include "content/public/common/result_codes.h"
#if defined(OS_MACOSX)
@@ -72,7 +72,8 @@ class BrowserActivityObserver : public content::NotificationObserver {
// Counts the number of active RenderProcessHosts and logs them.
void LogRenderProcessHostCount() const {
int hosts_count = 0;
- for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator());
+ for (content::RenderProcessHost::iterator i(
+ content::RenderProcessHost::AllHostsIterator());
!i.IsAtEnd(); i.Advance())
++hosts_count;
UMA_HISTOGRAM_CUSTOM_COUNTS("MPArch.RPHCountPerLoad", hosts_count,
diff --git a/chrome/browser/ui/cocoa/hung_renderer_controller.mm b/chrome/browser/ui/cocoa/hung_renderer_controller.mm
index 0003ae1..3e5e38e 100644
--- a/chrome/browser/ui/cocoa/hung_renderer_controller.mm
+++ b/chrome/browser/ui/cocoa/hung_renderer_controller.mm
@@ -16,9 +16,9 @@
#import "chrome/browser/ui/cocoa/tab_contents/favicon_util.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/logging_chrome.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/render_process_host.h"
#include "content/public/common/result_codes.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
diff --git a/chrome/browser/ui/gtk/hung_renderer_dialog_gtk.cc b/chrome/browser/ui/gtk/hung_renderer_dialog_gtk.cc
index f00a32b..b3668f4 100644
--- a/chrome/browser/ui/gtk/hung_renderer_dialog_gtk.cc
+++ b/chrome/browser/ui/gtk/hung_renderer_dialog_gtk.cc
@@ -13,9 +13,9 @@
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/logging_chrome.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/render_process_host.h"
#include "content/public/common/result_codes.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
diff --git a/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc b/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
index b381a03..972647f 100644
--- a/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
+++ b/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
@@ -589,7 +589,7 @@ void TabContentsWrapper::RenderViewCreated(RenderViewHost* render_view_host) {
void TabContentsWrapper::DidBecomeSelected() {
WebCacheManager::GetInstance()->ObserveActivity(
- tab_contents()->GetRenderProcessHost()->id());
+ tab_contents()->GetRenderProcessHost()->GetID());
}
bool TabContentsWrapper::OnMessageReceived(const IPC::Message& message) {
diff --git a/chrome/browser/ui/views/hung_renderer_view.cc b/chrome/browser/ui/views/hung_renderer_view.cc
index 0b75aa6..c128e19 100644
--- a/chrome/browser/ui/views/hung_renderer_view.cc
+++ b/chrome/browser/ui/views/hung_renderer_view.cc
@@ -12,9 +12,9 @@
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/logging_chrome.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/render_process_host.h"
#include "content/public/common/result_codes.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -61,7 +61,7 @@ class HungPagesTableModel : public views::GroupTableModel {
// Returns the first RenderProcessHost, or NULL if there aren't any
// TabContents.
- RenderProcessHost* GetRenderProcessHost();
+ content::RenderProcessHost* GetRenderProcessHost();
// Returns the first RenderViewHost, or NULL if there aren't any TabContents.
RenderViewHost* GetRenderViewHost();
@@ -124,7 +124,7 @@ HungPagesTableModel::HungPagesTableModel(Delegate* delegate)
HungPagesTableModel::~HungPagesTableModel() {
}
-RenderProcessHost* HungPagesTableModel::GetRenderProcessHost() {
+content::RenderProcessHost* HungPagesTableModel::GetRenderProcessHost() {
return tab_observers_.empty() ? NULL :
tab_observers_[0]->tab_contents()->GetRenderProcessHost();
}
diff --git a/chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc b/chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc
index 8ec3234..c22f9c5 100644
--- a/chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc
+++ b/chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc
@@ -12,13 +12,13 @@
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/browser/ui/views/tab_contents/native_tab_contents_view.h"
#include "chrome/browser/ui/views/tab_contents/render_view_context_menu_views.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_view_host_factory.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
#include "content/browser/tab_contents/interstitial_page.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_delegate.h"
+#include "content/public/browser/render_process_host.h"
#include "ui/gfx/screen.h"
#include "views/focus/focus_manager.h"
#include "views/focus/view_storage.h"
diff --git a/chrome/browser/ui/webui/media/media_internals_proxy.cc b/chrome/browser/ui/webui/media/media_internals_proxy.cc
index 928a019..5ee0eeb 100644
--- a/chrome/browser/ui/webui/media/media_internals_proxy.cc
+++ b/chrome/browser/ui/webui/media/media_internals_proxy.cc
@@ -10,8 +10,8 @@
#include "chrome/browser/media/media_internals.h"
#include "chrome/browser/ui/webui/media/media_internals_handler.h"
#include "content/public/browser/notification_service.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/render_process_host.h"
using content::BrowserThread;
@@ -37,9 +37,10 @@ void MediaInternalsProxy::Observe(int type,
const content::NotificationDetails& details) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK_EQ(type, content::NOTIFICATION_RENDERER_PROCESS_TERMINATED);
- RenderProcessHost* process = content::Source<RenderProcessHost>(source).ptr();
+ content::RenderProcessHost* process =
+ content::Source<content::RenderProcessHost>(source).ptr();
CallJavaScriptFunctionOnUIThread("media.onRendererTerminated",
- base::Value::CreateIntegerValue(process->id()));
+ base::Value::CreateIntegerValue(process->GetID()));
}
void MediaInternalsProxy::Attach(MediaInternalsMessageHandler* handler) {
diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui_browsertest.cc b/chrome/browser/ui/webui/ntp/new_tab_ui_browsertest.cc
index 8894e6f..39571e2 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_ui_browsertest.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_ui_browsertest.cc
@@ -36,7 +36,7 @@ IN_PROC_BROWSER_TEST_F(NewTabUIBrowserTest, ChromeInternalLoadsNTP) {
// doesn't cause us to kill the process. See http://crbug.com/104258.
IN_PROC_BROWSER_TEST_F(NewTabUIBrowserTest, LoadNTPInExistingProcess) {
// Set max renderers to 1 to force running out of processes.
- RenderProcessHost::SetMaxRendererProcessCountForTest(1);
+ content::RenderProcessHost::SetMaxRendererProcessCountForTest(1);
// Start server for simple page.
ASSERT_TRUE(test_server()->Start());
diff --git a/chrome/browser/ui/webui/options/extension_settings_handler.cc b/chrome/browser/ui/webui/options/extension_settings_handler.cc
index 668495f..56a4a86 100644
--- a/chrome/browser/ui/webui/options/extension_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/extension_settings_handler.cc
@@ -777,9 +777,9 @@ void ExtensionSettingsHandler::GetActivePagesForExtensionProcess(
continue;
GURL url = host->delegate()->GetURL();
- RenderProcessHost* process = host->process();
+ content::RenderProcessHost* process = host->process();
result->push_back(
- ExtensionPage(url, process->id(), host->routing_id(),
- process->browser_context()->IsOffTheRecord()));
+ ExtensionPage(url, process->GetID(), host->routing_id(),
+ process->GetBrowserContext()->IsOffTheRecord()));
}
}
diff --git a/chrome/browser/visitedlink/visitedlink_event_listener.cc b/chrome/browser/visitedlink/visitedlink_event_listener.cc
index a15dbe4..da41bba 100644
--- a/chrome/browser/visitedlink/visitedlink_event_listener.cc
+++ b/chrome/browser/visitedlink/visitedlink_event_listener.cc
@@ -7,10 +7,10 @@
#include "base/shared_memory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/render_messages.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_widget_host.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/render_process_host.h"
using base::Time;
using base::TimeDelta;
@@ -31,7 +31,7 @@ static const unsigned kVisitedLinkBufferThreshold = 50;
// As opposed to the VisitedLinkEventListener, which coalesces to
// reduce the rate of messages being sent to render processes, this class
// ensures that the updates occur only when explicitly requested. This is
-// used for BrowserRenderProcessHost to only send Add/Reset link events to the
+// used for RenderProcessHostImpl to only send Add/Reset link events to the
// renderers when their tabs are visible and the corresponding RenderViews are
// created.
class VisitedLinkUpdater {
@@ -42,7 +42,8 @@ class VisitedLinkUpdater {
// Informs the renderer about a new visited link table.
void SendVisitedLinkTable(base::SharedMemory* table_memory) {
- RenderProcessHost* process = RenderProcessHost::FromID(render_process_id_);
+ content::RenderProcessHost* process =
+ content::RenderProcessHost::FromID(render_process_id_);
if (!process)
return; // Happens in tests
base::SharedMemoryHandle handle_for_process;
@@ -77,7 +78,8 @@ class VisitedLinkUpdater {
// Sends visited link update messages: a list of links whose visited state
// changed or reset of visited state for all links.
void Update() {
- RenderProcessHost* process = RenderProcessHost::FromID(render_process_id_);
+ content::RenderProcessHost* process =
+ content::RenderProcessHost::FromID(render_process_id_);
if (!process)
return; // Happens in tests
@@ -124,8 +126,10 @@ void VisitedLinkEventListener::NewTable(base::SharedMemory* table_memory) {
// Send to all RenderProcessHosts.
for (Updaters::iterator i = updaters_.begin(); i != updaters_.end(); ++i) {
// Make sure to not send to incognito renderers.
- RenderProcessHost* process = RenderProcessHost::FromID(i->first);
- Profile* profile = Profile::FromBrowserContext(process->browser_context());
+ content::RenderProcessHost* process =
+ content::RenderProcessHost::FromID(i->first);
+ Profile* profile = Profile::FromBrowserContext(
+ process->GetBrowserContext());
VisitedLinkMaster* master = profile->GetVisitedLinkMaster();
if (master && master->shared_memory() == table_memory)
i->second->SendVisitedLinkTable(table_memory);
@@ -168,14 +172,14 @@ void VisitedLinkEventListener::Observe(
const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_RENDERER_PROCESS_CREATED: {
- RenderProcessHost* process =
- content::Source<RenderProcessHost>(source).ptr();
+ content::RenderProcessHost* process =
+ content::Source<content::RenderProcessHost>(source).ptr();
Profile* profile =
- Profile::FromBrowserContext(process->browser_context());
+ Profile::FromBrowserContext(process->GetBrowserContext());
if (!profile_->IsSameProfile(profile))
return;
- updaters_[process->id()] =
- make_linked_ptr(new VisitedLinkUpdater(process->id()));
+ updaters_[process->GetID()] =
+ make_linked_ptr(new VisitedLinkUpdater(process->GetID()));
// Initialize support for visited links. Send the renderer process its
// initial set of visited links.
@@ -183,21 +187,22 @@ void VisitedLinkEventListener::Observe(
if (!master)
return;
- updaters_[process->id()]->SendVisitedLinkTable(master->shared_memory());
+ updaters_[process->GetID()]->SendVisitedLinkTable(
+ master->shared_memory());
break;
}
case content::NOTIFICATION_RENDERER_PROCESS_TERMINATED: {
- RenderProcessHost* process =
- content::Source<RenderProcessHost>(source).ptr();
- if (updaters_.count(process->id())) {
- updaters_.erase(process->id());
+ content::RenderProcessHost* process =
+ content::Source<content::RenderProcessHost>(source).ptr();
+ if (updaters_.count(process->GetID())) {
+ updaters_.erase(process->GetID());
}
break;
}
case content::NOTIFICATION_RENDER_WIDGET_VISIBILITY_CHANGED: {
RenderWidgetHost* widget =
content::Source<RenderWidgetHost>(source).ptr();
- int child_id = widget->process()->id();
+ int child_id = widget->process()->GetID();
if (updaters_.count(child_id))
updaters_[child_id]->Update();
break;
diff --git a/chrome/browser/visitedlink/visitedlink_unittest.cc b/chrome/browser/visitedlink/visitedlink_unittest.cc
index 43e93a1..487c73d 100644
--- a/chrome/browser/visitedlink/visitedlink_unittest.cc
+++ b/chrome/browser/visitedlink/visitedlink_unittest.cc
@@ -18,7 +18,7 @@
#include "chrome/renderer/visitedlink_slave.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/browser/renderer_host/browser_render_process_host.h"
+#include "content/browser/renderer_host/render_process_host_impl.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "content/test/test_browser_thread.h"
@@ -495,12 +495,12 @@ class VisitCountingProfile : public TestingProfile {
scoped_ptr<VisitedLinkMaster> visited_link_master_;
};
-// Stub out as little as possible, borrowing from BrowserRenderProcessHost.
-class VisitRelayingRenderProcessHost : public BrowserRenderProcessHost {
+// Stub out as little as possible, borrowing from RenderProcessHost.
+class VisitRelayingRenderProcessHost : public RenderProcessHostImpl {
public:
explicit VisitRelayingRenderProcessHost(
content::BrowserContext* browser_context)
- : BrowserRenderProcessHost(browser_context) {
+ : RenderProcessHostImpl(browser_context) {
content::NotificationService::current()->Notify(
content::NOTIFICATION_RENDERER_PROCESS_CREATED,
content::Source<RenderProcessHost>(this),
@@ -509,7 +509,7 @@ class VisitRelayingRenderProcessHost : public BrowserRenderProcessHost {
virtual ~VisitRelayingRenderProcessHost() {
content::NotificationService::current()->Notify(
content::NOTIFICATION_RENDERER_PROCESS_TERMINATED,
- content::Source<RenderProcessHost>(this),
+ content::Source<content::RenderProcessHost>(this),
content::NotificationService::NoDetails());
}
@@ -532,7 +532,7 @@ class VisitRelayingRenderProcessHost : public BrowserRenderProcessHost {
virtual bool Send(IPC::Message* msg) {
VisitCountingProfile* counting_profile =
static_cast<VisitCountingProfile*>(
- Profile::FromBrowserContext(browser_context()));
+ Profile::FromBrowserContext(GetBrowserContext()));
if (msg->type() == ChromeViewMsg_VisitedLink_Add::ID) {
void* iter = NULL;
@@ -556,11 +556,11 @@ class VisitRelayingRenderProcessHost : public BrowserRenderProcessHost {
};
class VisitedLinkRenderProcessHostFactory
- : public RenderProcessHostFactory {
+ : public content::RenderProcessHostFactory {
public:
VisitedLinkRenderProcessHostFactory()
- : RenderProcessHostFactory() {}
- virtual RenderProcessHost* CreateRenderProcessHost(
+ : content::RenderProcessHostFactory() {}
+ virtual content::RenderProcessHost* CreateRenderProcessHost(
content::BrowserContext* browser_context) const OVERRIDE {
return new VisitRelayingRenderProcessHost(browser_context);
}
diff --git a/chrome/test/base/in_process_browser_test.cc b/chrome/test/base/in_process_browser_test.cc
index 02a2d7a..b26c80b 100644
--- a/chrome/test/base/in_process_browser_test.cc
+++ b/chrome/test/base/in_process_browser_test.cc
@@ -29,10 +29,10 @@
#include "chrome/test/base/test_launcher_utils.h"
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/ui_test_utils.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/render_process_host.h"
#include "content/renderer/mock_content_renderer_client.h"
#include "content/test/test_browser_thread.h"
#include "net/base/mock_host_resolver.h"
@@ -106,7 +106,7 @@ void InProcessBrowserTest::SetUp() {
// Single-process mode is not set in BrowserMain, so process it explicitly,
// and set up renderer.
if (command_line->HasSwitch(switches::kSingleProcess)) {
- RenderProcessHost::set_run_renderer_in_process(true);
+ content::RenderProcessHost::set_run_renderer_in_process(true);
single_process_renderer_client_.reset(
new content::MockContentRendererClient);
content::GetContentClient()->set_renderer(
diff --git a/chrome/test/base/ui_test_utils.cc b/chrome/test/base/ui_test_utils.cc
index 5097b05..aa35f0f 100644
--- a/chrome/test/base/ui_test_utils.cc
+++ b/chrome/test/base/ui_test_utils.cc
@@ -41,12 +41,12 @@
#include "chrome/test/test_navigation_observer.h"
#include "content/browser/download/download_item.h"
#include "content/browser/download/download_manager.h"
-#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/render_process_host.h"
#include "googleurl/src/gurl.h"
#include "net/base/net_util.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -505,11 +505,11 @@ AppModalDialog* WaitForAppModalDialog() {
}
void CrashTab(TabContents* tab) {
- RenderProcessHost* rph = tab->render_view_host()->process();
+ content::RenderProcessHost* rph = tab->render_view_host()->process();
base::KillProcess(rph->GetHandle(), 0, false);
TestNotificationObserver observer;
RegisterAndWait(&observer, content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
- content::Source<RenderProcessHost>(rph));
+ content::Source<content::RenderProcessHost>(rph));
}
void WaitForFocusChange(TabContents* tab_contents) {