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

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: remove SizeOfVector 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 } 68 }
69 69
70 gtk_widget_destroy(drag_widget_); 70 gtk_widget_destroy(drag_widget_);
71 gtk_widget_destroy(drag_icon_); 71 gtk_widget_destroy(drag_icon_);
72 } 72 }
73 73
74 void WebDragSourceGtk::StartDragging(const WebDropData& drop_data, 74 void WebDragSourceGtk::StartDragging(const WebDropData& drop_data,
75 WebDragOperationsMask allowed_ops, 75 WebDragOperationsMask allowed_ops,
76 GdkEventButton* last_mouse_down, 76 GdkEventButton* last_mouse_down,
77 const SkBitmap& image, 77 const SkBitmap& image,
78 const gfx::Point& image_offset) { 78 const gfx::Vector2d& image_offset) {
79 // Guard against re-starting before previous drag completed. 79 // Guard against re-starting before previous drag completed.
80 if (drag_context_) { 80 if (drag_context_) {
81 NOTREACHED(); 81 NOTREACHED();
82 web_contents_->SystemDragEnded(); 82 web_contents_->SystemDragEnded();
83 return; 83 return;
84 } 84 }
85 85
86 int targets_mask = 0; 86 int targets_mask = 0;
87 87
88 if (!drop_data.text.string().empty()) 88 if (!drop_data.text.string().empty())
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 cairo_clip(cr); 403 cairo_clip(cr);
404 cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE); 404 cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
405 gdk_cairo_set_source_pixbuf(cr, drag_pixbuf_, 0, 0); 405 gdk_cairo_set_source_pixbuf(cr, drag_pixbuf_, 0, 0);
406 cairo_paint(cr); 406 cairo_paint(cr);
407 cairo_destroy(cr); 407 cairo_destroy(cr);
408 408
409 return TRUE; 409 return TRUE;
410 } 410 }
411 411
412 } // namespace content 412 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698