| 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_guest.h" | 5 #include "content/browser/web_contents/web_contents_view_guest.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "content/browser/browser_plugin/browser_plugin_embedder.h" | 10 #include "content/browser/browser_plugin/browser_plugin_embedder.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 #endif | 29 #endif |
| 30 | 30 |
| 31 using blink::WebDragOperation; | 31 using blink::WebDragOperation; |
| 32 using blink::WebDragOperationsMask; | 32 using blink::WebDragOperationsMask; |
| 33 | 33 |
| 34 namespace content { | 34 namespace content { |
| 35 | 35 |
| 36 WebContentsViewGuest::WebContentsViewGuest( | 36 WebContentsViewGuest::WebContentsViewGuest( |
| 37 WebContentsImpl* web_contents, | 37 WebContentsImpl* web_contents, |
| 38 BrowserPluginGuest* guest, | 38 BrowserPluginGuest* guest, |
| 39 scoped_ptr<WebContentsView> platform_view, | 39 std::unique_ptr<WebContentsView> platform_view, |
| 40 RenderViewHostDelegateView** delegate_view) | 40 RenderViewHostDelegateView** delegate_view) |
| 41 : web_contents_(web_contents), | 41 : web_contents_(web_contents), |
| 42 guest_(guest), | 42 guest_(guest), |
| 43 platform_view_(std::move(platform_view)), | 43 platform_view_(std::move(platform_view)), |
| 44 platform_view_delegate_view_(*delegate_view) { | 44 platform_view_delegate_view_(*delegate_view) { |
| 45 *delegate_view = this; | 45 *delegate_view = this; |
| 46 } | 46 } |
| 47 | 47 |
| 48 WebContentsViewGuest::~WebContentsViewGuest() { | 48 WebContentsViewGuest::~WebContentsViewGuest() { |
| 49 } | 49 } |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 embedder_render_view_host->GetDelegate()->GetDelegateView(); | 234 embedder_render_view_host->GetDelegate()->GetDelegateView(); |
| 235 if (view) { | 235 if (view) { |
| 236 RecordAction(base::UserMetricsAction("BrowserPlugin.Guest.StartDrag")); | 236 RecordAction(base::UserMetricsAction("BrowserPlugin.Guest.StartDrag")); |
| 237 view->StartDragging(drop_data, ops, image, image_offset, event_info); | 237 view->StartDragging(drop_data, ops, image, image_offset, event_info); |
| 238 } else { | 238 } else { |
| 239 embedder_web_contents->SystemDragEnded(); | 239 embedder_web_contents->SystemDragEnded(); |
| 240 } | 240 } |
| 241 } | 241 } |
| 242 | 242 |
| 243 } // namespace content | 243 } // namespace content |
| OLD | NEW |