diff options
author | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-14 20:23:36 +0000 |
---|---|---|
committer | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-14 20:23:36 +0000 |
commit | edc286198b90c629bbf6081440512d02aef603d8 (patch) | |
tree | 6a15f556b635515188002bf6296a5334bfb1cf7e /chrome/browser/automation | |
parent | 3d840f473245973dac230a8d998c666e73348b1d (diff) | |
download | chromium_src-edc286198b90c629bbf6081440512d02aef603d8.zip chromium_src-edc286198b90c629bbf6081440512d02aef603d8.tar.gz chromium_src-edc286198b90c629bbf6081440512d02aef603d8.tar.bz2 |
Make the FindInPageController implement its own delegate interface for
RenderViewHost so that we can get rid of the pass-throughs in WebContents.
I removed some redundant checks in WebContents when calling view() for
render_view_host() since that internally checks the null-ness of
render_view_host().
BUG=1323267
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@881 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation')
-rw-r--r-- | chrome/browser/automation/automation_provider.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index a634a38..818c321 100644 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -1688,6 +1688,14 @@ void AutomationProvider::HandleFindInPageRequest( find_in_page_observer_.reset(new FindInPageNotificationObserver(this, tab_contents, message.routing_id())); + // The find in page dialog must be up for us to get the notification that the + // find was complete + if (tab_contents->AsWebContents()) { + NavigationController* tab = tab_tracker_->GetResource(handle); + Browser* browser = Browser::GetBrowserForController(tab, NULL); + tab_contents->AsWebContents()->OpenFindInPageWindow(*browser); + } + // The explicit comparison to TRUE avoids a warning (C4800). tab_contents->StartFinding( FindInPageNotificationObserver::kFindInPageRequestId, |