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

Side by Side Diff: content/browser/web_contents/web_drag_source_gtk.cc

Issue 11269022: Add Vector2d classes that represent offsets, instead of using Point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: RenderText fixup Created 8 years, 1 month 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 | Annotate | Revision Log
OLDNEW
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/file_util.h" 9 #include "base/file_util.h"
10 #include "base/nix/mime_util_xdg.h" 10 #include "base/nix/mime_util_xdg.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 } 66 }
67 67
68 gtk_widget_destroy(drag_widget_); 68 gtk_widget_destroy(drag_widget_);
69 gtk_widget_destroy(drag_icon_); 69 gtk_widget_destroy(drag_icon_);
70 } 70 }
71 71
72 void WebDragSourceGtk::StartDragging(const WebDropData& drop_data, 72 void WebDragSourceGtk::StartDragging(const WebDropData& drop_data,
73 WebDragOperationsMask allowed_ops, 73 WebDragOperationsMask allowed_ops,
74 GdkEventButton* last_mouse_down, 74 GdkEventButton* last_mouse_down,
75 const SkBitmap& image, 75 const SkBitmap& image,
76 const gfx::Point& image_offset) { 76 const gfx::Vector2d& image_offset) {
77 // Guard against re-starting before previous drag completed. 77 // Guard against re-starting before previous drag completed.
78 if (drag_context_) { 78 if (drag_context_) {
79 NOTREACHED(); 79 NOTREACHED();
80 web_contents_->SystemDragEnded(); 80 web_contents_->SystemDragEnded();
81 return; 81 return;
82 } 82 }
83 83
84 int targets_mask = 0; 84 int targets_mask = 0;
85 85
86 if (!drop_data.text.string().empty()) 86 if (!drop_data.text.string().empty())
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 cairo_clip(cr); 400 cairo_clip(cr);
401 cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE); 401 cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
402 gdk_cairo_set_source_pixbuf(cr, drag_pixbuf_, 0, 0); 402 gdk_cairo_set_source_pixbuf(cr, drag_pixbuf_, 0, 0);
403 cairo_paint(cr); 403 cairo_paint(cr);
404 cairo_destroy(cr); 404 cairo_destroy(cr);
405 405
406 return TRUE; 406 return TRUE;
407 } 407 }
408 408
409 } // namespace content 409 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698