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_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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 bool right_aligned, | 430 bool right_aligned, |
431 bool allow_multiple_selection) { | 431 bool allow_multiple_selection) { |
432 // External popup menus are only used on Mac and Android. | 432 // External popup menus are only used on Mac and Android. |
433 NOTIMPLEMENTED(); | 433 NOTIMPLEMENTED(); |
434 } | 434 } |
435 | 435 |
436 void WebContentsViewAura::StartDragging( | 436 void WebContentsViewAura::StartDragging( |
437 const WebDropData& drop_data, | 437 const WebDropData& drop_data, |
438 WebKit::WebDragOperationsMask operations, | 438 WebKit::WebDragOperationsMask operations, |
439 const gfx::ImageSkia& image, | 439 const gfx::ImageSkia& image, |
440 const gfx::Point& image_offset) { | 440 const gfx::Vector2d& image_offset) { |
441 aura::RootWindow* root_window = GetNativeView()->GetRootWindow(); | 441 aura::RootWindow* root_window = GetNativeView()->GetRootWindow(); |
442 if (!aura::client::GetDragDropClient(root_window)) | 442 if (!aura::client::GetDragDropClient(root_window)) |
443 return; | 443 return; |
444 | 444 |
445 ui::OSExchangeDataProviderAura* provider = new ui::OSExchangeDataProviderAura; | 445 ui::OSExchangeDataProviderAura* provider = new ui::OSExchangeDataProviderAura; |
446 PrepareDragData(drop_data, provider); | 446 PrepareDragData(drop_data, provider); |
447 if (!image.isNull()) { | 447 if (!image.isNull()) { |
448 provider->set_drag_image(image); | 448 provider->set_drag_image(image); |
449 provider->set_drag_image_offset(image_offset); | 449 provider->set_drag_image_offset(image_offset); |
450 } | 450 } |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
686 event.location(), | 686 event.location(), |
687 gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(), | 687 gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(), |
688 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); | 688 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); |
689 if (drag_dest_delegate_) | 689 if (drag_dest_delegate_) |
690 drag_dest_delegate_->OnDrop(); | 690 drag_dest_delegate_->OnDrop(); |
691 current_drop_data_.reset(); | 691 current_drop_data_.reset(); |
692 return current_drag_op_; | 692 return current_drag_op_; |
693 } | 693 } |
694 | 694 |
695 } // namespace content | 695 } // namespace content |
OLD | NEW |