OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_BROWSER_WEB_CONTENTS_WEB_DRAG_DEST_GTK_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_DRAG_DEST_GTK_H_ |
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_DRAG_DEST_GTK_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_DRAG_DEST_GTK_H_ |
7 | 7 |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 | 9 |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 // there is no system drag or the system drag is not over our render view. | 78 // there is no system drag or the system drag is not over our render view. |
79 GdkDragContext* context_; | 79 GdkDragContext* context_; |
80 | 80 |
81 // The data for the current drag, or NULL if |context_| is NULL. | 81 // The data for the current drag, or NULL if |context_| is NULL. |
82 scoped_ptr<DropData> drop_data_; | 82 scoped_ptr<DropData> drop_data_; |
83 | 83 |
84 // The number of outstanding drag data requests we have sent to the drag | 84 // The number of outstanding drag data requests we have sent to the drag |
85 // source. | 85 // source. |
86 int data_requests_; | 86 int data_requests_; |
87 | 87 |
| 88 // Whether the drag we're currently handling originated from a renderer. |
| 89 bool renderer_tainted_; |
| 90 |
88 // The last time we sent a message to the renderer related to a drag motion. | 91 // The last time we sent a message to the renderer related to a drag motion. |
89 gint drag_over_time_; | 92 gint drag_over_time_; |
90 | 93 |
91 // Whether the cursor is over a drop target, according to the last message we | 94 // Whether the cursor is over a drop target, according to the last message we |
92 // got from the renderer. | 95 // got from the renderer. |
93 bool is_drop_target_; | 96 bool is_drop_target_; |
94 | 97 |
95 // Stores Handler IDs for the gtk signal handlers. We have to cancel the | 98 // Stores Handler IDs for the gtk signal handlers. We have to cancel the |
96 // signal handlers when this WebDragDestGtk is deleted so that if, later on, | 99 // signal handlers when this WebDragDestGtk is deleted so that if, later on, |
97 // we re-create the drag dest with the same widget, we don't get callbacks to | 100 // we re-create the drag dest with the same widget, we don't get callbacks to |
98 // deleted functions. | 101 // deleted functions. |
99 scoped_ptr<int[]> handlers_; | 102 scoped_ptr<int[]> handlers_; |
100 | 103 |
101 // A delegate that can receive drag information about drag events. | 104 // A delegate that can receive drag information about drag events. |
102 WebDragDestDelegate* delegate_; | 105 WebDragDestDelegate* delegate_; |
103 | 106 |
104 // True if the drag has been canceled. | 107 // True if the drag has been canceled. |
105 bool canceled_; | 108 bool canceled_; |
106 | 109 |
107 base::WeakPtrFactory<WebDragDestGtk> method_factory_; | 110 base::WeakPtrFactory<WebDragDestGtk> method_factory_; |
108 | 111 |
109 DISALLOW_COPY_AND_ASSIGN(WebDragDestGtk); | 112 DISALLOW_COPY_AND_ASSIGN(WebDragDestGtk); |
110 }; | 113 }; |
111 | 114 |
112 } // namespace content | 115 } // namespace content |
113 | 116 |
114 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_DRAG_DEST_GTK_H_ | 117 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_DRAG_DEST_GTK_H_ |
OLD | NEW |