summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation
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/browser/automation
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/browser/automation')
-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
3 files changed, 7 insertions, 7 deletions
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());