OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_VIEWS_TAB_CONTENTS_TAB_CONTENTS_VIEW_GTK_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_TAB_CONTENTS_TAB_CONTENTS_VIEW_GTK_H_ |
6 #define CHROME_BROWSER_VIEWS_TAB_CONTENTS_TAB_CONTENTS_VIEW_GTK_H_ | 6 #define CHROME_BROWSER_VIEWS_TAB_CONTENTS_TAB_CONTENTS_VIEW_GTK_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
11 #include "chrome/browser/tab_contents/tab_contents_view.h" | 11 #include "chrome/browser/tab_contents/tab_contents_view.h" |
12 #include "gfx/size.h" | 12 #include "gfx/size.h" |
13 #include "views/widget/widget_gtk.h" | 13 #include "views/widget/widget_gtk.h" |
14 | 14 |
15 class ConstrainedWindowGtk; | 15 class ConstrainedWindowGtk; |
16 typedef struct _GtkFloatingContainer GtkFloatingContainer; | 16 typedef struct _GtkFloatingContainer GtkFloatingContainer; |
17 class RenderViewContextMenuGtk; | 17 class RenderViewContextMenuGtk; |
18 class SadTabView; | 18 class SadTabView; |
19 class SkBitmap; | |
20 class TabContentsDragSource; | 19 class TabContentsDragSource; |
21 class WebDragDestGtk; | 20 class WebDragDestGtk; |
22 namespace gfx { | |
23 class Point; | |
24 } | |
25 namespace views { | 21 namespace views { |
26 class NativeViewHost; | 22 class NativeViewHost; |
27 } | 23 } |
28 | 24 |
29 // Gtk-specific implementation of the TabContentsView for the views-based front | 25 // Gtk-specific implementation of the TabContentsView for the views-based front |
30 // end. It is a WidgetGtk that contains all of the contents of the tab and | 26 // end. It is a WidgetGtk that contains all of the contents of the tab and |
31 // associated child views. | 27 // associated child views. |
32 class TabContentsViewGtk : public TabContentsView, | 28 class TabContentsViewGtk : public TabContentsView, |
33 public views::WidgetGtk { | 29 public views::WidgetGtk { |
34 public: | 30 public: |
(...skipping 23 matching lines...) Expand all Loading... |
58 virtual void OnTabCrashed(); | 54 virtual void OnTabCrashed(); |
59 virtual void SizeContents(const gfx::Size& size); | 55 virtual void SizeContents(const gfx::Size& size); |
60 virtual void Focus(); | 56 virtual void Focus(); |
61 virtual void SetInitialFocus(); | 57 virtual void SetInitialFocus(); |
62 virtual void StoreFocus(); | 58 virtual void StoreFocus(); |
63 virtual void RestoreFocus(); | 59 virtual void RestoreFocus(); |
64 | 60 |
65 // Backend implementation of RenderViewHostDelegate::View. | 61 // Backend implementation of RenderViewHostDelegate::View. |
66 virtual void ShowContextMenu(const ContextMenuParams& params); | 62 virtual void ShowContextMenu(const ContextMenuParams& params); |
67 virtual void StartDragging(const WebDropData& drop_data, | 63 virtual void StartDragging(const WebDropData& drop_data, |
68 WebKit::WebDragOperationsMask ops_allowed, | 64 WebKit::WebDragOperationsMask ops_allowed); |
69 const SkBitmap& image, | |
70 const gfx::Point& image_offset); | |
71 virtual void UpdateDragCursor(WebKit::WebDragOperation operation); | 65 virtual void UpdateDragCursor(WebKit::WebDragOperation operation); |
72 virtual void GotFocus(); | 66 virtual void GotFocus(); |
73 virtual void TakeFocus(bool reverse); | 67 virtual void TakeFocus(bool reverse); |
74 | 68 |
75 private: | 69 private: |
76 // Signal handlers ----------------------------------------------------------- | 70 // Signal handlers ----------------------------------------------------------- |
77 | 71 |
78 // Overridden from views::WidgetGtk: | 72 // Overridden from views::WidgetGtk: |
79 virtual gboolean OnButtonPress(GtkWidget* widget, GdkEventButton* event); | 73 virtual gboolean OnButtonPress(GtkWidget* widget, GdkEventButton* event); |
80 virtual void OnSizeAllocate(GtkWidget* widget, GtkAllocation* allocation); | 74 virtual void OnSizeAllocate(GtkWidget* widget, GtkAllocation* allocation); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 gfx::Size size_; | 117 gfx::Size size_; |
124 | 118 |
125 // Each individual UI for constrained dialogs currently displayed. The | 119 // Each individual UI for constrained dialogs currently displayed. The |
126 // objects in this vector are owned by the TabContents, not the view. | 120 // objects in this vector are owned by the TabContents, not the view. |
127 std::vector<ConstrainedWindowGtk*> constrained_windows_; | 121 std::vector<ConstrainedWindowGtk*> constrained_windows_; |
128 | 122 |
129 DISALLOW_COPY_AND_ASSIGN(TabContentsViewGtk); | 123 DISALLOW_COPY_AND_ASSIGN(TabContentsViewGtk); |
130 }; | 124 }; |
131 | 125 |
132 #endif // CHROME_BROWSER_VIEWS_TAB_CONTENTS_TAB_CONTENTS_VIEW_GTK_H_ | 126 #endif // CHROME_BROWSER_VIEWS_TAB_CONTENTS_TAB_CONTENTS_VIEW_GTK_H_ |
OLD | NEW |