summaryrefslogtreecommitdiffstats
path: root/chrome/browser/find_in_page_controller.h
diff options
context:
space:
mode:
authorbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-14 20:23:36 +0000
committerbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-14 20:23:36 +0000
commitedc286198b90c629bbf6081440512d02aef603d8 (patch)
tree6a15f556b635515188002bf6296a5334bfb1cf7e /chrome/browser/find_in_page_controller.h
parent3d840f473245973dac230a8d998c666e73348b1d (diff)
downloadchromium_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/find_in_page_controller.h')
-rw-r--r--chrome/browser/find_in_page_controller.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/chrome/browser/find_in_page_controller.h b/chrome/browser/find_in_page_controller.h
index 4848cd4..1ee56d4 100644
--- a/chrome/browser/find_in_page_controller.h
+++ b/chrome/browser/find_in_page_controller.h
@@ -31,8 +31,8 @@
#define CHROME_BROWSER_FIND_IN_PAGE_CONTROLLER_H__
#include "base/gfx/size.h"
+#include "chrome/browser/render_view_host_delegate.h"
#include "chrome/common/slide_animation.h"
-#include "chrome/common/notification_service.h"
#include "chrome/views/hwnd_view_container.h"
class FindInPageView;
@@ -56,7 +56,7 @@ namespace ChromeViews {
// We create one controller per tab and remember each search query per tab.
//
////////////////////////////////////////////////////////////////////////////////
-class FindInPageController : public NotificationObserver,
+class FindInPageController : public RenderViewHostDelegate::FindInPage,
public ChromeViews::FocusChangeListener,
public ChromeViews::HWNDViewContainer,
public AnimationDelegate {
@@ -141,7 +141,15 @@ class FindInPageController : public NotificationObserver,
// AnimationDelegate implementation:
virtual void AnimationProgressed(const Animation* animation);
virtual void AnimationEnded(const Animation* animation);
+
private:
+ // RenderViewHostDelegate::FindInPage implementation.
+ virtual void FindReply(int request_id,
+ int number_of_matches,
+ const gfx::Rect& selection_rect,
+ int active_match_ordinal,
+ bool final_update);
+
// Retrieves the boundaries that the FindInPage dialog has to work with within
// the Chrome frame window. The resulting rectangle will be a rectangle that
// overlaps the bottom of the Chrome toolbar by one pixel (so we can create
@@ -193,12 +201,6 @@ class FindInPageController : public NotificationObserver,
// also: SetFocusChangeListener().
void UnregisterEscAccelerator();
- // Listens for notifications to know when search results are available, or
- // when user selected a new tab (at which point we need to show/hide the
- // FindInPage window depending on what the user selected).
- virtual void Observe(NotificationType type, const NotificationSource& source,
- const NotificationDetails& details);
-
// The tab we are associated with.
TabContents* parent_tab_;