Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7661)

Unified Diff: chrome/browser/ui/views/tab_contents/tab_contents_view_views.h

Issue 7015051: Re-land: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
};

Powered by Google App Engine
This is Rietveld 408576698