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/ui/gtk/tab_contents_drag_source.h" | 5 #include "chrome/browser/ui/gtk/tab_contents_drag_source.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/mime_util.h" | 10 #include "base/mime_util.h" |
11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
12 #include "chrome/browser/download/download_util.h" | 12 #include "chrome/browser/download/download_util.h" |
13 #include "chrome/browser/download/drag_download_file.h" | 13 #include "chrome/browser/download/drag_download_file.h" |
14 #include "chrome/browser/download/drag_download_util.h" | 14 #include "chrome/browser/download/drag_download_util.h" |
15 #include "chrome/browser/renderer_host/render_view_host.h" | 15 #include "chrome/browser/renderer_host/render_view_host.h" |
16 #include "chrome/browser/renderer_host/render_view_host_delegate.h" | 16 #include "chrome/browser/renderer_host/render_view_host_delegate.h" |
17 #include "chrome/browser/tab_contents/tab_contents.h" | 17 #include "chrome/browser/tab_contents/tab_contents.h" |
18 #include "chrome/browser/tab_contents/tab_contents_view.h" | 18 #include "chrome/browser/tab_contents/tab_contents_view.h" |
19 #include "chrome/browser/ui/gtk/gtk_util.h" | 19 #include "chrome/browser/ui/gtk/gtk_util.h" |
20 #include "gfx/gtk_util.h" | |
21 #include "net/base/file_stream.h" | 20 #include "net/base/file_stream.h" |
22 #include "net/base/net_util.h" | 21 #include "net/base/net_util.h" |
23 #include "ui/base/dragdrop/gtk_dnd_util.h" | 22 #include "ui/base/dragdrop/gtk_dnd_util.h" |
| 23 #include "ui/gfx/gtk_util.h" |
24 #include "webkit/glue/webdropdata.h" | 24 #include "webkit/glue/webdropdata.h" |
25 | 25 |
26 using WebKit::WebDragOperation; | 26 using WebKit::WebDragOperation; |
27 using WebKit::WebDragOperationsMask; | 27 using WebKit::WebDragOperationsMask; |
28 using WebKit::WebDragOperationNone; | 28 using WebKit::WebDragOperationNone; |
29 | 29 |
30 TabContentsDragSource::TabContentsDragSource( | 30 TabContentsDragSource::TabContentsDragSource( |
31 TabContentsView* tab_contents_view) | 31 TabContentsView* tab_contents_view) |
32 : tab_contents_view_(tab_contents_view), | 32 : tab_contents_view_(tab_contents_view), |
33 drag_pixbuf_(NULL), | 33 drag_pixbuf_(NULL), |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 cairo_t* cr = gdk_cairo_create(event->window); | 374 cairo_t* cr = gdk_cairo_create(event->window); |
375 gdk_cairo_rectangle(cr, &event->area); | 375 gdk_cairo_rectangle(cr, &event->area); |
376 cairo_clip(cr); | 376 cairo_clip(cr); |
377 cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE); | 377 cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE); |
378 gdk_cairo_set_source_pixbuf(cr, drag_pixbuf_, 0, 0); | 378 gdk_cairo_set_source_pixbuf(cr, drag_pixbuf_, 0, 0); |
379 cairo_paint(cr); | 379 cairo_paint(cr); |
380 cairo_destroy(cr); | 380 cairo_destroy(cr); |
381 | 381 |
382 return TRUE; | 382 return TRUE; |
383 } | 383 } |
OLD | NEW |