| 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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 | 398 |
| 399 //////////////////////////////////////////////////////////////////////////////// | 399 //////////////////////////////////////////////////////////////////////////////// |
| 400 // WebContentsViewAura, RenderViewHostDelegateView implementation: | 400 // WebContentsViewAura, RenderViewHostDelegateView implementation: |
| 401 | 401 |
| 402 void WebContentsViewAura::ShowContextMenu( | 402 void WebContentsViewAura::ShowContextMenu( |
| 403 const content::ContextMenuParams& params) { | 403 const content::ContextMenuParams& params) { |
| 404 if (delegate_.get()) | 404 if (delegate_.get()) |
| 405 delegate_->ShowContextMenu(params); | 405 delegate_->ShowContextMenu(params); |
| 406 } | 406 } |
| 407 | 407 |
| 408 void WebContentsViewAura::ShowPopupMenu(const gfx::Rect& bounds, |
| 409 int item_height, |
| 410 double item_font_size, |
| 411 int selected_item, |
| 412 const std::vector<WebMenuItem>& items, |
| 413 bool right_aligned, |
| 414 bool allow_multiple_selection) { |
| 415 // External popup menus are only used on Mac and Android. |
| 416 NOTIMPLEMENTED(); |
| 417 } |
| 418 |
| 408 void WebContentsViewAura::StartDragging( | 419 void WebContentsViewAura::StartDragging( |
| 409 const WebDropData& drop_data, | 420 const WebDropData& drop_data, |
| 410 WebKit::WebDragOperationsMask operations, | 421 WebKit::WebDragOperationsMask operations, |
| 411 const SkBitmap& image, | 422 const SkBitmap& image, |
| 412 const gfx::Point& image_offset) { | 423 const gfx::Point& image_offset) { |
| 413 aura::RootWindow* root_window = GetNativeView()->GetRootWindow(); | 424 aura::RootWindow* root_window = GetNativeView()->GetRootWindow(); |
| 414 if (!aura::client::GetDragDropClient(root_window)) | 425 if (!aura::client::GetDragDropClient(root_window)) |
| 415 return; | 426 return; |
| 416 | 427 |
| 417 ui::OSExchangeDataProviderAura* provider = new ui::OSExchangeDataProviderAura; | 428 ui::OSExchangeDataProviderAura* provider = new ui::OSExchangeDataProviderAura; |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 OnDragEntered(event); | 616 OnDragEntered(event); |
| 606 | 617 |
| 607 web_contents_->GetRenderViewHost()->DragTargetDrop( | 618 web_contents_->GetRenderViewHost()->DragTargetDrop( |
| 608 event.location(), | 619 event.location(), |
| 609 GetNativeView()->GetRootWindow()->last_mouse_location(), | 620 GetNativeView()->GetRootWindow()->last_mouse_location(), |
| 610 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); | 621 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); |
| 611 if (drag_dest_delegate_) | 622 if (drag_dest_delegate_) |
| 612 drag_dest_delegate_->OnDrop(); | 623 drag_dest_delegate_->OnDrop(); |
| 613 return current_drag_op_; | 624 return current_drag_op_; |
| 614 } | 625 } |
| OLD | NEW |