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