| 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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 682 web_contents_->GetRenderViewHost()->DragTargetDrop( | 682 web_contents_->GetRenderViewHost()->DragTargetDrop( |
| 683 event.location(), | 683 event.location(), |
| 684 gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(), | 684 gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(), |
| 685 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); | 685 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); |
| 686 if (drag_dest_delegate_) | 686 if (drag_dest_delegate_) |
| 687 drag_dest_delegate_->OnDrop(); | 687 drag_dest_delegate_->OnDrop(); |
| 688 return current_drag_op_; | 688 return current_drag_op_; |
| 689 } | 689 } |
| 690 | 690 |
| 691 } // namespace content | 691 } // namespace content |
| OLD | NEW |