| 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 #include "content/browser/web_contents/web_drag_source_gtk.h" | 5 #include "content/browser/web_contents/web_drag_source_gtk.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/nix/mime_util_xdg.h" | 9 #include "base/nix/mime_util_xdg.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "content/public/common/drop_data.h" | 21 #include "content/public/common/drop_data.h" |
| 22 #include "net/base/file_stream.h" | 22 #include "net/base/file_stream.h" |
| 23 #include "net/base/net_util.h" | 23 #include "net/base/net_util.h" |
| 24 #include "third_party/skia/include/core/SkBitmap.h" | 24 #include "third_party/skia/include/core/SkBitmap.h" |
| 25 #include "ui/base/clipboard/custom_data_helper.h" | 25 #include "ui/base/clipboard/custom_data_helper.h" |
| 26 #include "ui/base/dragdrop/gtk_dnd_util.h" | 26 #include "ui/base/dragdrop/gtk_dnd_util.h" |
| 27 #include "ui/base/gtk/gtk_screen_util.h" | 27 #include "ui/base/gtk/gtk_screen_util.h" |
| 28 #include "ui/gfx/gtk_compat.h" | 28 #include "ui/gfx/gtk_compat.h" |
| 29 #include "ui/gfx/gtk_util.h" | 29 #include "ui/gfx/gtk_util.h" |
| 30 | 30 |
| 31 using WebKit::WebDragOperation; | 31 using blink::WebDragOperation; |
| 32 using WebKit::WebDragOperationsMask; | 32 using blink::WebDragOperationsMask; |
| 33 using WebKit::WebDragOperationNone; | 33 using blink::WebDragOperationNone; |
| 34 | 34 |
| 35 namespace content { | 35 namespace content { |
| 36 | 36 |
| 37 WebDragSourceGtk::WebDragSourceGtk(WebContents* web_contents) | 37 WebDragSourceGtk::WebDragSourceGtk(WebContents* web_contents) |
| 38 : web_contents_(static_cast<WebContentsImpl*>(web_contents)), | 38 : web_contents_(static_cast<WebContentsImpl*>(web_contents)), |
| 39 drag_pixbuf_(NULL), | 39 drag_pixbuf_(NULL), |
| 40 drag_failed_(false), | 40 drag_failed_(false), |
| 41 drag_widget_(gtk_invisible_new()), | 41 drag_widget_(gtk_invisible_new()), |
| 42 drag_context_(NULL), | 42 drag_context_(NULL), |
| 43 drag_icon_(gtk_window_new(GTK_WINDOW_POPUP)) { | 43 drag_icon_(gtk_window_new(GTK_WINDOW_POPUP)) { |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 cairo_clip(cr); | 394 cairo_clip(cr); |
| 395 cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE); | 395 cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE); |
| 396 gdk_cairo_set_source_pixbuf(cr, drag_pixbuf_, 0, 0); | 396 gdk_cairo_set_source_pixbuf(cr, drag_pixbuf_, 0, 0); |
| 397 cairo_paint(cr); | 397 cairo_paint(cr); |
| 398 cairo_destroy(cr); | 398 cairo_destroy(cr); |
| 399 | 399 |
| 400 return TRUE; | 400 return TRUE; |
| 401 } | 401 } |
| 402 | 402 |
| 403 } // namespace content | 403 } // namespace content |
| OLD | NEW |