summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui
diff options
context:
space:
mode:
authorbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-12 16:11:09 +0000
committerbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-12 16:11:09 +0000
commitb6e09acf8ced26198871626c76bb5a3741cc51f1 (patch)
treea4029d45393a1c34ba1b88d67c052512ad16c7eb /chrome/browser/dom_ui
parent2526315929de99fa5762583621fb52b626a62ef9 (diff)
downloadchromium_src-b6e09acf8ced26198871626c76bb5a3741cc51f1.zip
chromium_src-b6e09acf8ced26198871626c76bb5a3741cc51f1.tar.gz
chromium_src-b6e09acf8ced26198871626c76bb5a3741cc51f1.tar.bz2
Move RenderViewHost management out of WebContents into a new
RenderViewHostManager object. The goal for this patch is to change no logic or APIs, just move the code. So there are some not very clean callback functions and no new unit tests for this file (although is is still covered by the same WebContents unit tests). This should make the actual cleanup in a later pass much easier to follow. I changed the ordering of only a few operations (like WebContents shutdown), and checked that this shouldn't matter. I had to change the "source" for several notifications since they are no longer sent from the WebContents. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@716 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui')
-rw-r--r--chrome/browser/dom_ui/dom_ui_host.cc5
-rw-r--r--chrome/browser/dom_ui/dom_ui_host.h3
2 files changed, 5 insertions, 3 deletions
diff --git a/chrome/browser/dom_ui/dom_ui_host.cc b/chrome/browser/dom_ui/dom_ui_host.cc
index b7d685f..f00c5a3 100644
--- a/chrome/browser/dom_ui/dom_ui_host.cc
+++ b/chrome/browser/dom_ui/dom_ui_host.cc
@@ -54,13 +54,14 @@ DOMUIHost::~DOMUIHost() {
STLDeleteContainerPointers(handlers_.begin(), handlers_.end());
}
-bool DOMUIHost::CreateRenderView(RenderViewHost* render_view_host) {
+bool DOMUIHost::CreateRenderViewForRenderManager(
+ RenderViewHost* render_view_host) {
// Be sure to enable DOM UI bindings on the RenderViewHost before
// CreateRenderView is called. Since a cross-site transition may be
// involved, this may or may not be the same RenderViewHost that we had when
// we were created.
render_view_host->AllowDOMUIBindings();
- return WebContents::CreateRenderView(render_view_host);
+ return WebContents::CreateRenderViewForRenderManager(render_view_host);
}
void DOMUIHost::AddMessageHandler(DOMMessageHandler* handler) {
diff --git a/chrome/browser/dom_ui/dom_ui_host.h b/chrome/browser/dom_ui/dom_ui_host.h
index 09d624f..a0a5970 100644
--- a/chrome/browser/dom_ui/dom_ui_host.h
+++ b/chrome/browser/dom_ui/dom_ui_host.h
@@ -60,7 +60,8 @@ class DOMUIHost : public WebContents {
RenderViewHostFactory* render_view_factory);
// Initializes the given renderer, after enabling DOM UI bindings on it.
- virtual bool CreateRenderView(RenderViewHost* render_view_host);
+ virtual bool CreateRenderViewForRenderManager(
+ RenderViewHost* render_view_host);
// Add type-specific javascript message handlers.
// TODO(timsteele): Any implementation of this method should really be done