OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_UI_VIEWS_TAB_CONTENTS_NATIVE_TAB_CONTENTS_VIEW_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_NATIVE_TAB_CONTENTS_VIEW_GTK_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_NATIVE_TAB_CONTENTS_VIEW_GTK_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_NATIVE_TAB_CONTENTS_VIEW_GTK_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_view.h" | 9 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_view.h" |
10 #include "views/widget/native_widget_gtk.h" | 10 #include "views/widget/native_widget_gtk.h" |
11 | 11 |
12 class ConstrainedWindowGtk; | 12 class ConstrainedWindowGtk; |
13 class TabContents; | 13 class TabContents; |
14 class TabContentsDragSource; | 14 class TabContentsDragSource; |
| 15 class WebDragBookmarkHandlerGtk; |
15 class WebDragDestGtk; | 16 class WebDragDestGtk; |
16 | 17 |
17 class NativeTabContentsViewGtk : public views::NativeWidgetGtk, | 18 class NativeTabContentsViewGtk : public views::NativeWidgetGtk, |
18 public NativeTabContentsView { | 19 public NativeTabContentsView { |
19 public: | 20 public: |
20 explicit NativeTabContentsViewGtk( | 21 explicit NativeTabContentsViewGtk( |
21 internal::NativeTabContentsViewDelegate* delegate); | 22 internal::NativeTabContentsViewDelegate* delegate); |
22 virtual ~NativeTabContentsViewGtk(); | 23 virtual ~NativeTabContentsViewGtk(); |
23 | 24 |
24 // Unlike Windows, ConstrainedWindows need to collaborate with the | 25 // Unlike Windows, ConstrainedWindows need to collaborate with the |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 // Handles drags from this TabContentsView. | 67 // Handles drags from this TabContentsView. |
67 scoped_ptr<TabContentsDragSource> drag_source_; | 68 scoped_ptr<TabContentsDragSource> drag_source_; |
68 | 69 |
69 // The event for the last mouse down we handled. We need this for drags. | 70 // The event for the last mouse down we handled. We need this for drags. |
70 GdkEventButton last_mouse_down_; | 71 GdkEventButton last_mouse_down_; |
71 | 72 |
72 // The helper object that handles drag destination related interactions with | 73 // The helper object that handles drag destination related interactions with |
73 // GTK. | 74 // GTK. |
74 scoped_ptr<WebDragDestGtk> drag_dest_; | 75 scoped_ptr<WebDragDestGtk> drag_dest_; |
75 | 76 |
| 77 // The chrome specific delegate that receives events from WebDragDestGtk. |
| 78 scoped_ptr<WebDragBookmarkHandlerGtk> bookmark_handler_gtk_; |
| 79 |
76 // Current size. See comment in NativeWidgetGtk as to why this is cached. | 80 // Current size. See comment in NativeWidgetGtk as to why this is cached. |
77 gfx::Size size_; | 81 gfx::Size size_; |
78 | 82 |
79 // Each individual UI for constrained dialogs currently displayed. The | 83 // Each individual UI for constrained dialogs currently displayed. The |
80 // objects in this vector are owned by the TabContents, not the view. | 84 // objects in this vector are owned by the TabContents, not the view. |
81 std::vector<ConstrainedWindowGtk*> constrained_windows_; | 85 std::vector<ConstrainedWindowGtk*> constrained_windows_; |
82 | 86 |
83 DISALLOW_COPY_AND_ASSIGN(NativeTabContentsViewGtk); | 87 DISALLOW_COPY_AND_ASSIGN(NativeTabContentsViewGtk); |
84 }; | 88 }; |
85 | 89 |
86 #endif // CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_NATIVE_TAB_CONTENTS_VIEW_GTK_H_ | 90 #endif // CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_NATIVE_TAB_CONTENTS_VIEW_GTK_H_ |
87 | 91 |
OLD | NEW |