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
diff --git a/content/browser/download/download_manager_impl.cc b/content/browser/download/download_manager_impl.cc
index 62dd7e8e..f1a73092 100644
--- a/content/browser/download/download_manager_impl.cc
+++ b/content/browser/download/download_manager_impl.cc
@@ -25,7 +25,6 @@
#include "content/browser/download/download_stats.h"
#include "content/browser/download/download_status_updater.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/browser/tab_contents/tab_contents.h"
@@ -34,6 +33,7 @@
#include "content/public/browser/download_manager_delegate.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/render_process_host.h"
using content::BrowserThread;
@@ -730,7 +730,7 @@
BrowserThread::IO, FROM_HERE,
base::Bind(&BeginDownload,
URLParams(url, referrer), save_info, resource_dispatcher_host,
- RenderParams(tab_contents->GetRenderProcessHost()->id(),
+ RenderParams(tab_contents->GetRenderProcessHost()->GetID(),
tab_contents->render_view_host()->routing_id()),
&tab_contents->browser_context()->GetResourceContext()));
}