| Index: chrome/browser/ui/views/tab_contents/tab_contents_view_views.h
|
| ===================================================================
|
| --- chrome/browser/ui/views/tab_contents/tab_contents_view_views.h (revision 85284)
|
| +++ chrome/browser/ui/views/tab_contents/tab_contents_view_views.h (working copy)
|
| @@ -10,6 +10,7 @@
|
| #include "base/timer.h"
|
| #include "chrome/browser/ui/views/tab_contents/native_tab_contents_view_delegate.h"
|
| #include "content/browser/tab_contents/tab_contents_view.h"
|
| +#include "views/widget/widget.h"
|
|
|
| class NativeTabContentsView;
|
| class RenderViewContextMenuViews;
|
| @@ -27,7 +28,8 @@
|
| // Views-specific implementation of the TabContentsView.
|
| // TODO(beng): Remove last remnants of Windows-specificity, and make this
|
| // subclass Widget.
|
| -class TabContentsViewViews : public TabContentsView,
|
| +class TabContentsViewViews : public views::Widget,
|
| + public TabContentsView,
|
| public internal::NativeTabContentsViewDelegate {
|
| public:
|
| // The corresponding TabContents is passed in the constructor, and manages our
|
| @@ -40,6 +42,10 @@
|
| // not receive any messages.
|
| virtual void Unparent();
|
|
|
| + NativeTabContentsView* native_tab_contents_view() const {
|
| + return native_tab_contents_view_;
|
| + }
|
| +
|
| // Overridden from TabContentsView:
|
| virtual void CreateView(const gfx::Size& initial_size) OVERRIDE;
|
| virtual RenderWidgetHostView* CreateViewForWidget(
|
| @@ -81,13 +87,15 @@
|
| virtual void OnNativeTabContentsViewShown() OVERRIDE;
|
| virtual void OnNativeTabContentsViewHidden() OVERRIDE;
|
| virtual void OnNativeTabContentsViewSized(const gfx::Size& size) OVERRIDE;
|
| - virtual void OnNativeTabContentsViewWheelZoom(int distance) OVERRIDE;
|
| + virtual void OnNativeTabContentsViewWheelZoom(bool zoom_in) OVERRIDE;
|
| virtual void OnNativeTabContentsViewMouseDown() OVERRIDE;
|
| - virtual void OnNativeTabContentsViewMouseMove() OVERRIDE;
|
| + virtual void OnNativeTabContentsViewMouseMove(bool motion) OVERRIDE;
|
| virtual void OnNativeTabContentsViewDraggingEnded() OVERRIDE;
|
| + virtual views::internal::NativeWidgetDelegate* AsNativeWidgetDelegate()
|
| + OVERRIDE;
|
|
|
| - views::Widget* GetWidget();
|
| - const views::Widget* GetWidget() const;
|
| + // Overridden from views::Widget:
|
| + virtual views::FocusManager* GetFocusManager() OVERRIDE;
|
|
|
| // A helper method for closing the tab.
|
| void CloseTab();
|
| @@ -108,7 +116,7 @@
|
|
|
| // ---------------------------------------------------------------------------
|
|
|
| - scoped_ptr<NativeTabContentsView> native_tab_contents_view_;
|
| + NativeTabContentsView* native_tab_contents_view_;
|
|
|
| // Used to render the sad tab. This will be non-NULL only when the sad tab is
|
| // visible.
|
| @@ -127,6 +135,10 @@
|
| // Used to close the tab after the stack has unwound.
|
| base::OneShotTimer<TabContentsViewViews> close_tab_timer_;
|
|
|
| + // The FocusManager associated with this tab. Stored as it is not directly
|
| + // accessible when un-parented.
|
| + views::FocusManager* focus_manager_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(TabContentsViewViews);
|
| };
|
|
|
|
|