summaryrefslogtreecommitdiffstats
path: root/chrome/browser/web_contents_view_win.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/web_contents_view_win.h')
-rw-r--r--chrome/browser/web_contents_view_win.h33
1 files changed, 29 insertions, 4 deletions
diff --git a/chrome/browser/web_contents_view_win.h b/chrome/browser/web_contents_view_win.h
index 13e2138..d1ea193 100644
--- a/chrome/browser/web_contents_view_win.h
+++ b/chrome/browser/web_contents_view_win.h
@@ -5,10 +5,12 @@
#ifndef CHROME_BROWSER_WEB_CONTENTS_VIEW_WIN_H_
#define CHROME_BROWSER_WEB_CONTENTS_VIEW_WIN_H_
+#include "base/gfx/size.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/web_contents_view.h"
#include "chrome/views/container_win.h"
+class FindBarWin;
class InfoBarView;
class InfoBarMessageView;
class SadTabView;
@@ -28,8 +30,7 @@ class WebContentsViewWin : public WebContentsView,
// WebContentsView implementation --------------------------------------------
- // TODO(brettw) what on earth is the difference between this and
- // CreatePageView. Do we really need both?
+ virtual WebContents* GetWebContents();
virtual void CreateView(HWND parent_hwnd,
const gfx::Rect& initial_bounds);
virtual RenderWidgetHostViewWin* CreateViewForWidget(
@@ -37,13 +38,20 @@ class WebContentsViewWin : public WebContentsView,
virtual HWND GetContainerHWND() const;
virtual HWND GetContentHWND() const;
virtual void GetContainerBounds(gfx::Rect* out) const;
- virtual void DetachPluginWindows();
+ virtual void OnContentsDestroy();
virtual void DisplayErrorInInfoBar(const std::wstring& text);
virtual void SetInfoBarVisible(bool visible);
virtual bool IsInfoBarVisible() const;
virtual InfoBarView* GetInfoBarView();
virtual void SetPageTitle(const std::wstring& title);
virtual void Invalidate();
+ virtual void SizeContents(const gfx::Size& size);
+ virtual void FindInPage(const Browser& browser,
+ bool find_next, bool forward_direction);
+ virtual void HideFindBar(bool end_session);
+ virtual void ReparentFindWindow(Browser* new_browser) const;
+ virtual bool GetFindBarWindowInfo(gfx::Point* position,
+ bool* fully_visible) const;
// Backend implementation of RenderViewHostDelegate::View.
virtual WebContents* CreateNewWindowInternal(
@@ -61,6 +69,11 @@ class WebContentsViewWin : public WebContentsView,
virtual void UpdateDragCursor(bool is_drop_target);
virtual void TakeFocus(bool reverse);
virtual void HandleKeyboardEvent(const WebKeyboardEvent& event);
+ virtual void OnFindReply(int request_id,
+ int number_of_matches,
+ const gfx::Rect& selection_rect,
+ int active_match_ordinal,
+ bool final_update);
private:
// Windows events ------------------------------------------------------------
@@ -84,15 +97,27 @@ class WebContentsViewWin : public WebContentsView,
void ScrollCommon(UINT message, int scroll_type, short position,
HWND scrollbar);
+ // Handles notifying the WebContents and other operations when the window was
+ // shown or hidden.
+ void WasHidden();
+ void WasShown();
+
+ // Handles resizing of the contents. This will notify the RenderWidgetHostView
+ // of the change, reposition popups, and the find in page bar.
+ void WasSized(const gfx::Size& size);
+
// TODO(brettw) comment these. They're confusing.
bool ScrollZoom(int scroll_type);
void WheelZoom(int distance);
// ---------------------------------------------------------------------------
- // TODO(brettw) when this class is separated from WebContents, we should own
WebContents* web_contents_;
+ // For find in page. This may be NULL if there is no find bar, and if it is
+ // non-NULL, it may or may not be visible.
+ scoped_ptr<FindBarWin> find_bar_;
+
// A drop target object that handles drags over this WebContents.
scoped_refptr<WebDropTarget> drop_target_;