diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-07 12:13:52 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-07 12:13:52 +0000 |
commit | ba3d09a1464372826de29fea84f8d7c1605ebd11 (patch) | |
tree | 43686193dfec4a600409d5ad937936dc7984b236 /chrome/test/base/ui_test_utils.cc | |
parent | ed70ed186fd054a0c75796e714ef65970315dc43 (diff) | |
download | chromium_src-ba3d09a1464372826de29fea84f8d7c1605ebd11.zip chromium_src-ba3d09a1464372826de29fea84f8d7c1605ebd11.tar.gz chromium_src-ba3d09a1464372826de29fea84f8d7c1605ebd11.tar.bz2 |
Remove TabContents from ui/find_bar.
BUG=107201
TEST=no visible change
Review URL: https://chromiumcodereview.appspot.com/11341021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166392 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/base/ui_test_utils.cc')
-rw-r--r-- | chrome/test/base/ui_test_utils.cc | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/chrome/test/base/ui_test_utils.cc b/chrome/test/base/ui_test_utils.cc index 87248a3..5244a0a 100644 --- a/chrome/test/base/ui_test_utils.cc +++ b/chrome/test/base/ui_test_utils.cc @@ -45,7 +45,6 @@ #include "chrome/browser/ui/host_desktop.h" #include "chrome/browser/ui/omnibox/location_bar.h" #include "chrome/browser/ui/omnibox/omnibox_view.h" -#include "chrome/browser/ui/tab_contents/tab_contents.h" #include "chrome/common/chrome_notification_types.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/pref_names.h" @@ -97,15 +96,14 @@ namespace { class FindInPageNotificationObserver : public content::NotificationObserver { public: - explicit FindInPageNotificationObserver(TabContents* parent_tab) - : parent_tab_(parent_tab), - active_match_ordinal_(-1), + explicit FindInPageNotificationObserver(WebContents* parent_tab) + : active_match_ordinal_(-1), number_of_matches_(0) { FindTabHelper* find_tab_helper = - FindTabHelper::FromWebContents(parent_tab->web_contents()); + FindTabHelper::FromWebContents(parent_tab); current_find_request_id_ = find_tab_helper->current_find_request_id(); registrar_.Add(this, chrome::NOTIFICATION_FIND_RESULT_AVAILABLE, - content::Source<WebContents>(parent_tab_->web_contents())); + content::Source<WebContents>(parent_tab)); message_loop_runner_ = new content::MessageLoopRunner; message_loop_runner_->Run(); } @@ -139,7 +137,6 @@ class FindInPageNotificationObserver : public content::NotificationObserver { private: content::NotificationRegistrar registrar_; - TabContents* parent_tab_; // We will at some point (before final update) be notified of the ordinal and // we need to preserve it so we can send it later. int active_match_ordinal_; @@ -377,13 +374,12 @@ AppModalDialog* WaitForAppModalDialog() { return content::Source<AppModalDialog>(observer.source()).ptr(); } -int FindInPage(TabContents* tab_contents, const string16& search_string, +int FindInPage(WebContents* tab, const string16& search_string, bool forward, bool match_case, int* ordinal, gfx::Rect* selection_rect) { - FindTabHelper* find_tab_helper = - FindTabHelper::FromWebContents(tab_contents->web_contents()); + FindTabHelper* find_tab_helper = FindTabHelper::FromWebContents(tab); find_tab_helper->StartFinding(search_string, forward, match_case); - FindInPageNotificationObserver observer(tab_contents); + FindInPageNotificationObserver observer(tab); if (ordinal) *ordinal = observer.active_match_ordinal(); if (selection_rect) |