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

Side by Side Diff: chrome/browser/gtk/tab_contents_drag_source.h

Issue 1589015: GTK plumbing for dragend. (Closed)
Patch Set: Created 10 years, 8 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 unified diff | Download patch
« no previous file with comments | « app/gtk_dnd_util.cc ('k') | chrome/browser/gtk/tab_contents_drag_source.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_GTK_TAB_CONTENTS_DRAG_SOURCE_H_ 5 #ifndef CHROME_BROWSER_GTK_TAB_CONTENTS_DRAG_SOURCE_H_
6 #define CHROME_BROWSER_GTK_TAB_CONTENTS_DRAG_SOURCE_H_ 6 #define CHROME_BROWSER_GTK_TAB_CONTENTS_DRAG_SOURCE_H_
7 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 gboolean OnDragFailed(); 52 gboolean OnDragFailed();
53 static void OnDragBeginThunk(GtkWidget* widget, 53 static void OnDragBeginThunk(GtkWidget* widget,
54 GdkDragContext* drag_context, 54 GdkDragContext* drag_context,
55 TabContentsDragSource* handler) { 55 TabContentsDragSource* handler) {
56 handler->OnDragBegin(drag_context); 56 handler->OnDragBegin(drag_context);
57 } 57 }
58 void OnDragBegin(GdkDragContext* drag_context); 58 void OnDragBegin(GdkDragContext* drag_context);
59 static void OnDragEndThunk(GtkWidget* widget, 59 static void OnDragEndThunk(GtkWidget* widget,
60 GdkDragContext* drag_context, 60 GdkDragContext* drag_context,
61 TabContentsDragSource* handler) { 61 TabContentsDragSource* handler) {
62 handler->OnDragEnd(drag_context, WebKit::WebDragOperationCopy); 62 handler->OnDragEnd(drag_context, drag_context->action);
63 // TODO(snej): Pass actual operation instead of hardcoding copy
64 } 63 }
65 void OnDragEnd(GdkDragContext* drag_context, 64 void OnDragEnd(GdkDragContext* drag_context,
66 WebKit::WebDragOperation operation); 65 GdkDragAction operation);
67 static void OnDragDataGetThunk(GtkWidget* drag_widget, 66 static void OnDragDataGetThunk(GtkWidget* drag_widget,
68 GdkDragContext* context, 67 GdkDragContext* context,
69 GtkSelectionData* selection_data, 68 GtkSelectionData* selection_data,
70 guint target_type, 69 guint target_type,
71 guint time, 70 guint time,
72 TabContentsDragSource* handler) { 71 TabContentsDragSource* handler) {
73 handler->OnDragDataGet(context, selection_data, target_type, time); 72 handler->OnDragDataGet(context, selection_data, target_type, time);
74 } 73 }
75 void OnDragDataGet(GdkDragContext* context, GtkSelectionData* selection_data, 74 void OnDragDataGet(GdkDragContext* context, GtkSelectionData* selection_data,
76 guint target_type, guint time); 75 guint target_type, guint time);
(...skipping 30 matching lines...) Expand all
107 // The file name to be saved to for a drag-out download. 106 // The file name to be saved to for a drag-out download.
108 FilePath download_file_name_; 107 FilePath download_file_name_;
109 108
110 // The URL to download from for a drag-out download. 109 // The URL to download from for a drag-out download.
111 GURL download_url_; 110 GURL download_url_;
112 111
113 DISALLOW_COPY_AND_ASSIGN(TabContentsDragSource); 112 DISALLOW_COPY_AND_ASSIGN(TabContentsDragSource);
114 }; 113 };
115 114
116 #endif // CHROME_BROWSER_GTK_TAB_CONTENTS_DRAG_SOURCE_H_ 115 #endif // CHROME_BROWSER_GTK_TAB_CONTENTS_DRAG_SOURCE_H_
OLDNEW
« no previous file with comments | « app/gtk_dnd_util.cc ('k') | chrome/browser/gtk/tab_contents_drag_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698