summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents/tab_contents.cc
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-06 20:29:18 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-06 20:29:18 +0000
commit1ee61486ee0854be7b82d9fca66bb49d563ede4c (patch)
tree6f8ba801a5f19e022a281d622d7eaf467d637214 /chrome/browser/tab_contents/tab_contents.cc
parent0928fb62d472e45d2bd23d97aa43b5f704c00bec (diff)
downloadchromium_src-1ee61486ee0854be7b82d9fca66bb49d563ede4c.zip
chromium_src-1ee61486ee0854be7b82d9fca66bb49d563ede4c.tar.gz
chromium_src-1ee61486ee0854be7b82d9fca66bb49d563ede4c.tar.bz2
Do some refactoring of renderer_host.
This removes the last dependency on tab_contents from the renderer_host code and into the RenderViewHostDelegate. Some of the tests depended on tab_contents, so I moved to a new directory with the tab_contents include allowed via DEPS. Now DEPS can enforce that no additional tab_contents includes are added to renderer_host. RenderViewHost delegate is now pure virtual. After spending a while *again* figuring out why my code didn't work, only to find it was because the default implementation of a function was getting called instead of the real one, I decided to make this pure virtual. It is implemented by TabContents, which implements basically everything, and two other places that implement less. Only two lists of duplicate functions seems not too bad, although long-term it would be nice if this delegate was somehow more succinct. Review URL: http://codereview.chromium.org/155071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19982 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents/tab_contents.cc')
-rw-r--r--chrome/browser/tab_contents/tab_contents.cc25
1 files changed, 20 insertions, 5 deletions
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index 3b46d99..8141c42 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -50,6 +50,7 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/pref_service.h"
#include "chrome/common/render_messages.h"
+#include "chrome/common/renderer_preferences.h"
#include "chrome/common/url_constants.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
@@ -57,6 +58,8 @@
#include "net/base/net_errors.h"
#include "net/base/net_util.h"
#include "net/base/registry_controlled_domain.h"
+#include "webkit/glue/password_form.h"
+#include "webkit/glue/webpreferences.h"
#if defined(OS_WIN)
// For CRect
@@ -1862,6 +1865,10 @@ void TabContents::RequestOpenURL(const GURL& url, const GURL& referrer,
}
}
+void TabContents::DomOperationResponse(const std::string& json_string,
+ int automation_id) {
+}
+
void TabContents::ProcessDOMUIMessage(const std::string& message,
const std::string& content,
int request_id,
@@ -2133,6 +2140,10 @@ void TabContents::OnCrossSiteResponse(int new_render_process_host_id,
new_request_id);
}
+void TabContents::OnCrossSiteNavigationCanceled() {
+ render_manager_.CrossSiteNavigationCanceled();
+}
+
bool TabContents::CanBlur() const {
return delegate() ? delegate()->CanBlur() : true;
}
@@ -2205,6 +2216,13 @@ void TabContents::OnUserGesture() {
controller_.OnUserGesture();
}
+bool TabContents::IsExternalTabContainer() const {
+ if (!delegate())
+ return false;
+
+ return delegate()->IsExternalTabContainer();
+}
+
void TabContents::OnFindReply(int request_id,
int number_of_matches,
const gfx::Rect& selection_rect,
@@ -2236,11 +2254,8 @@ void TabContents::OnFindReply(int request_id,
Details<FindNotificationDetails>(&last_search_result_));
}
-bool TabContents::IsExternalTabContainer() const {
- if (!delegate())
- return false;
-
- return delegate()->IsExternalTabContainer();
+void TabContents::DidInsertCSS() {
+ // This RVHDelegate function is used for extensions and not us.
}
void TabContents::FileSelected(const FilePath& path,