| 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 #include "chrome/browser/tab_contents/web_drag_dest_gtk.h" | 5 #include "chrome/browser/tab_contents/web_drag_dest_gtk.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| 11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
| 12 #include "chrome/browser/tab_contents/web_drag_dest_delegate_gtk.h" | 12 #include "chrome/browser/tab_contents/web_drag_dest_delegate_gtk.h" |
| 13 #include "content/browser/renderer_host/render_view_host.h" | 13 #include "content/browser/renderer_host/render_view_host.h" |
| 14 #include "content/browser/tab_contents/drag_utils_gtk.h" | 14 #include "content/browser/tab_contents/drag_utils_gtk.h" |
| 15 #include "content/browser/tab_contents/tab_contents.h" | 15 #include "content/browser/tab_contents/tab_contents.h" |
| 16 #include "content/common/url_constants.h" | 16 #include "content/public/common/url_constants.h" |
| 17 #include "net/base/net_util.h" | 17 #include "net/base/net_util.h" |
| 18 #include "ui/base/dragdrop/gtk_dnd_util.h" | 18 #include "ui/base/dragdrop/gtk_dnd_util.h" |
| 19 #include "ui/base/gtk/gtk_screen_utils.h" | 19 #include "ui/base/gtk/gtk_screen_utils.h" |
| 20 | 20 |
| 21 using WebKit::WebDragOperation; | 21 using WebKit::WebDragOperation; |
| 22 using WebKit::WebDragOperationNone; | 22 using WebKit::WebDragOperationNone; |
| 23 | 23 |
| 24 WebDragDestGtk::WebDragDestGtk(TabContents* tab_contents, GtkWidget* widget) | 24 WebDragDestGtk::WebDragDestGtk(TabContents* tab_contents, GtkWidget* widget) |
| 25 : tab_contents_(tab_contents), | 25 : tab_contents_(tab_contents), |
| 26 widget_(widget), | 26 widget_(widget), |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 if (delegate()) | 250 if (delegate()) |
| 251 delegate()->OnDrop(); | 251 delegate()->OnDrop(); |
| 252 | 252 |
| 253 // The second parameter is just an educated guess as to whether or not the | 253 // The second parameter is just an educated guess as to whether or not the |
| 254 // drag succeeded, but at least we will get the drag-end animation right | 254 // drag succeeded, but at least we will get the drag-end animation right |
| 255 // sometimes. | 255 // sometimes. |
| 256 gtk_drag_finish(context, is_drop_target_, FALSE, time); | 256 gtk_drag_finish(context, is_drop_target_, FALSE, time); |
| 257 | 257 |
| 258 return TRUE; | 258 return TRUE; |
| 259 } | 259 } |
| OLD | NEW |