summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authordhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-23 20:17:58 +0000
committerdhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-23 20:17:58 +0000
commit696be3f7c6a1eb25384bcc77cbedc387a6aa3355 (patch)
tree454eb4cfe6cfd199782b0a161c49b2110045c5c6 /content
parentfac6bb62034ed21e9a475f44f20c8f7d8121c5da (diff)
downloadchromium_src-696be3f7c6a1eb25384bcc77cbedc387a6aa3355.zip
chromium_src-696be3f7c6a1eb25384bcc77cbedc387a6aa3355.tar.gz
chromium_src-696be3f7c6a1eb25384bcc77cbedc387a6aa3355.tar.bz2
Get rid of references to Autocomplete from src\content, specifically from TabContents
Moves the tab's instance of AutocompleteHistoryManager from TabContents to TabContentsWrapper as a helper class. Also adds virtual accessor to test infrastucture so that |contents()| can come from TabContentsWrapperTestHarness or RenderViewHostTestHarness, depending on the situation. BUG=77087 TEST=AutofillManangerTest.* Review URL: http://codereview.chromium.org/6722029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79172 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/renderer_host/test_render_view_host.cc8
-rw-r--r--content/browser/renderer_host/test_render_view_host.h4
-rw-r--r--content/browser/tab_contents/tab_contents.cc2
-rw-r--r--content/browser/tab_contents/tab_contents.h8
4 files changed, 6 insertions, 16 deletions
diff --git a/content/browser/renderer_host/test_render_view_host.cc b/content/browser/renderer_host/test_render_view_host.cc
index 816f867..003766f 100644
--- a/content/browser/renderer_host/test_render_view_host.cc
+++ b/content/browser/renderer_host/test_render_view_host.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -281,7 +281,7 @@ RenderViewHostTestHarness::~RenderViewHostTestHarness() {
}
NavigationController& RenderViewHostTestHarness::controller() {
- return contents_->controller();
+ return contents()->controller();
}
TestTabContents* RenderViewHostTestHarness::contents() {
@@ -289,12 +289,12 @@ TestTabContents* RenderViewHostTestHarness::contents() {
}
TestRenderViewHost* RenderViewHostTestHarness::rvh() {
- return static_cast<TestRenderViewHost*>(contents_->render_view_host());
+ return static_cast<TestRenderViewHost*>(contents()->render_view_host());
}
TestRenderViewHost* RenderViewHostTestHarness::pending_rvh() {
return static_cast<TestRenderViewHost*>(
- contents_->render_manager()->pending_render_view_host());
+ contents()->render_manager()->pending_render_view_host());
}
TestRenderViewHost* RenderViewHostTestHarness::active_rvh() {
diff --git a/content/browser/renderer_host/test_render_view_host.h b/content/browser/renderer_host/test_render_view_host.h
index 01bd215..c51296d 100644
--- a/content/browser/renderer_host/test_render_view_host.h
+++ b/content/browser/renderer_host/test_render_view_host.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -268,7 +268,7 @@ class RenderViewHostTestHarness : public testing::Test {
virtual ~RenderViewHostTestHarness();
NavigationController& controller();
- TestTabContents* contents();
+ virtual TestTabContents* contents();
TestRenderViewHost* rvh();
TestRenderViewHost* pending_rvh();
TestRenderViewHost* active_rvh();
diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc
index 14e228a7..f24f1c6 100644
--- a/content/browser/tab_contents/tab_contents.cc
+++ b/content/browser/tab_contents/tab_contents.cc
@@ -13,7 +13,6 @@
#include "base/string_util.h"
#include "base/time.h"
#include "base/utf_string_conversions.h"
-#include "chrome/browser/autocomplete_history_manager.h"
#include "chrome/browser/blocked_content_container.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_shutdown.h"
@@ -384,7 +383,6 @@ TabContents::~TabContents() {
void TabContents::AddObservers() {
printing_.reset(new printing::PrintViewManager(this));
favicon_helper_.reset(new FaviconHelper(this));
- autocomplete_history_manager_.reset(new AutocompleteHistoryManager(this));
desktop_notification_handler_.reset(
new DesktopNotificationHandlerForTC(this, GetRenderProcessHost()));
plugin_observer_.reset(new PluginObserver(this));
diff --git a/content/browser/tab_contents/tab_contents.h b/content/browser/tab_contents/tab_contents.h
index bba4e86..e67b822 100644
--- a/content/browser/tab_contents/tab_contents.h
+++ b/content/browser/tab_contents/tab_contents.h
@@ -64,7 +64,6 @@ namespace safe_browsing {
class ClientSideDetectionHost;
}
-class AutocompleteHistoryManager;
class BlockedContentContainer;
class WebUI;
class DesktopNotificationHandlerForTC;
@@ -708,10 +707,6 @@ class TabContents : public PageNavigator,
int content_restrictions() const { return content_restrictions_; }
- AutocompleteHistoryManager* autocomplete_history_manager() {
- return autocomplete_history_manager_.get();
- }
-
safe_browsing::ClientSideDetectionHost* safebrowsing_detection_host() {
return safebrowsing_detection_host_.get();
}
@@ -1055,9 +1050,6 @@ class TabContents : public PageNavigator,
// SavePackage, lazily created.
scoped_refptr<SavePackage> save_package_;
- // AutocompleteHistoryManager.
- scoped_ptr<AutocompleteHistoryManager> autocomplete_history_manager_;
-
// Handles plugin messages.
scoped_ptr<PluginObserver> plugin_observer_;