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

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

Issue 10855159: Support Drag and Drop across displays. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable DragDropTrackerTest on Win Created 8 years, 4 months 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_contents_view_aura.h" 5 #include "content/browser/web_contents/web_contents_view_aura.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "content/browser/renderer_host/dip_util.h" 8 #include "content/browser/renderer_host/dip_util.h"
9 #include "content/browser/renderer_host/render_view_host_factory.h" 9 #include "content/browser/renderer_host/render_view_host_factory.h"
10 #include "content/browser/web_contents/interstitial_page_impl.h" 10 #include "content/browser/web_contents/interstitial_page_impl.h"
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 // updates while in the system DoDragDrop loop. 445 // updates while in the system DoDragDrop loop.
446 int result_op = 0; 446 int result_op = 0;
447 { 447 {
448 // TODO(sad): Avoid using GetCursorScreenPoint here, since the drag may not 448 // TODO(sad): Avoid using GetCursorScreenPoint here, since the drag may not
449 // always start from a mouse-event (e.g. a touch or gesture event could 449 // always start from a mouse-event (e.g. a touch or gesture event could
450 // initiate the drag). The location information should be carried over from 450 // initiate the drag). The location information should be carried over from
451 // webkit. http://crbug.com/114754 451 // webkit. http://crbug.com/114754
452 gfx::Point location(gfx::Screen::GetCursorScreenPoint()); 452 gfx::Point location(gfx::Screen::GetCursorScreenPoint());
453 MessageLoop::ScopedNestableTaskAllower allow(MessageLoop::current()); 453 MessageLoop::ScopedNestableTaskAllower allow(MessageLoop::current());
454 result_op = aura::client::GetDragDropClient(root_window)->StartDragAndDrop( 454 result_op = aura::client::GetDragDropClient(root_window)->StartDragAndDrop(
455 data, location, ConvertFromWeb(operations)); 455 data, root_window, location, ConvertFromWeb(operations));
456 } 456 }
457 457
458 EndDrag(ConvertToWeb(result_op)); 458 EndDrag(ConvertToWeb(result_op));
459 web_contents_->GetRenderViewHost()->DragSourceSystemDragEnded(); 459 web_contents_->GetRenderViewHost()->DragSourceSystemDragEnded();
460 } 460 }
461 461
462 void WebContentsViewAura::UpdateDragCursor(WebKit::WebDragOperation operation) { 462 void WebContentsViewAura::UpdateDragCursor(WebKit::WebDragOperation operation) {
463 current_drag_op_ = operation; 463 current_drag_op_ = operation;
464 } 464 }
465 465
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 OnDragEntered(event); 633 OnDragEntered(event);
634 634
635 web_contents_->GetRenderViewHost()->DragTargetDrop( 635 web_contents_->GetRenderViewHost()->DragTargetDrop(
636 event.location(), 636 event.location(),
637 gfx::Screen::GetCursorScreenPoint(), 637 gfx::Screen::GetCursorScreenPoint(),
638 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); 638 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags()));
639 if (drag_dest_delegate_) 639 if (drag_dest_delegate_)
640 drag_dest_delegate_->OnDrop(); 640 drag_dest_delegate_->OnDrop();
641 return current_drag_op_; 641 return current_drag_op_;
642 } 642 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698