| 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/browser_plugin/browser_plugin_guest.h" | 5 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 797 blink::WebDragOperationsMask mask, | 797 blink::WebDragOperationsMask mask, |
| 798 const gfx::Point& location) { | 798 const gfx::Point& location) { |
| 799 RenderViewHost* host = GetWebContents()->GetRenderViewHost(); | 799 RenderViewHost* host = GetWebContents()->GetRenderViewHost(); |
| 800 auto embedder = owner_web_contents_->GetBrowserPluginEmbedder(); | 800 auto embedder = owner_web_contents_->GetBrowserPluginEmbedder(); |
| 801 switch (drag_status) { | 801 switch (drag_status) { |
| 802 case blink::WebDragStatusEnter: | 802 case blink::WebDragStatusEnter: |
| 803 // Only track the URL being dragged over the guest if the link isn't | 803 // Only track the URL being dragged over the guest if the link isn't |
| 804 // coming from the guest. | 804 // coming from the guest. |
| 805 if (!embedder->DragEnteredGuest(this)) | 805 if (!embedder->DragEnteredGuest(this)) |
| 806 dragged_url_ = drop_data.url; | 806 dragged_url_ = drop_data.url; |
| 807 host->DragTargetDragEnter(drop_data, location, location, mask, 0); | 807 host->DragTargetDragEnter(drop_data, location, location, mask, |
| 808 drop_data.key_modifiers); |
| 808 break; | 809 break; |
| 809 case blink::WebDragStatusOver: | 810 case blink::WebDragStatusOver: |
| 810 host->DragTargetDragOver(location, location, mask, 0); | 811 host->DragTargetDragOver(location, location, mask, |
| 812 drop_data.key_modifiers); |
| 811 break; | 813 break; |
| 812 case blink::WebDragStatusLeave: | 814 case blink::WebDragStatusLeave: |
| 813 embedder->DragLeftGuest(this); | 815 embedder->DragLeftGuest(this); |
| 814 host->DragTargetDragLeave(); | 816 host->DragTargetDragLeave(); |
| 815 break; | 817 break; |
| 816 case blink::WebDragStatusDrop: | 818 case blink::WebDragStatusDrop: |
| 817 host->DragTargetDrop(location, location, 0); | 819 host->DragTargetDrop(location, location, drop_data.key_modifiers); |
| 818 if (dragged_url_.is_valid()) { | 820 if (dragged_url_.is_valid()) { |
| 819 delegate_->DidDropLink(dragged_url_); | 821 delegate_->DidDropLink(dragged_url_); |
| 820 dragged_url_ = GURL(); | 822 dragged_url_ = GURL(); |
| 821 } | 823 } |
| 822 break; | 824 break; |
| 823 case blink::WebDragStatusUnknown: | 825 case blink::WebDragStatusUnknown: |
| 824 NOTREACHED(); | 826 NOTREACHED(); |
| 825 } | 827 } |
| 826 last_drag_status_ = drag_status; | 828 last_drag_status_ = drag_status; |
| 827 EndSystemDragIfApplicable(); | 829 EndSystemDragIfApplicable(); |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1003 range, character_bounds); | 1005 range, character_bounds); |
| 1004 } | 1006 } |
| 1005 #endif | 1007 #endif |
| 1006 | 1008 |
| 1007 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { | 1009 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { |
| 1008 if (delegate_) | 1010 if (delegate_) |
| 1009 delegate_->SetContextMenuPosition(position); | 1011 delegate_->SetContextMenuPosition(position); |
| 1010 } | 1012 } |
| 1011 | 1013 |
| 1012 } // namespace content | 1014 } // namespace content |
| OLD | NEW |