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> |
| 8 |
7 #include "build/build_config.h" | 9 #include "build/build_config.h" |
8 #include "content/browser/browser_plugin/browser_plugin_embedder.h" | 10 #include "content/browser/browser_plugin/browser_plugin_embedder.h" |
9 #include "content/browser/browser_plugin/browser_plugin_guest.h" | 11 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
10 #include "content/browser/frame_host/interstitial_page_impl.h" | 12 #include "content/browser/frame_host/interstitial_page_impl.h" |
11 #include "content/browser/frame_host/render_widget_host_view_guest.h" | 13 #include "content/browser/frame_host/render_widget_host_view_guest.h" |
12 #include "content/browser/renderer_host/render_view_host_factory.h" | 14 #include "content/browser/renderer_host/render_view_host_factory.h" |
13 #include "content/browser/renderer_host/render_view_host_impl.h" | 15 #include "content/browser/renderer_host/render_view_host_impl.h" |
14 #include "content/browser/web_contents/web_contents_impl.h" | 16 #include "content/browser/web_contents/web_contents_impl.h" |
15 #include "content/common/drag_messages.h" | 17 #include "content/common/drag_messages.h" |
16 #include "content/public/browser/user_metrics.h" | 18 #include "content/public/browser/user_metrics.h" |
(...skipping 14 matching lines...) Expand all Loading... |
31 | 33 |
32 namespace content { | 34 namespace content { |
33 | 35 |
34 WebContentsViewGuest::WebContentsViewGuest( | 36 WebContentsViewGuest::WebContentsViewGuest( |
35 WebContentsImpl* web_contents, | 37 WebContentsImpl* web_contents, |
36 BrowserPluginGuest* guest, | 38 BrowserPluginGuest* guest, |
37 scoped_ptr<WebContentsView> platform_view, | 39 scoped_ptr<WebContentsView> platform_view, |
38 RenderViewHostDelegateView** delegate_view) | 40 RenderViewHostDelegateView** delegate_view) |
39 : web_contents_(web_contents), | 41 : web_contents_(web_contents), |
40 guest_(guest), | 42 guest_(guest), |
41 platform_view_(platform_view.Pass()), | 43 platform_view_(std::move(platform_view)), |
42 platform_view_delegate_view_(*delegate_view) { | 44 platform_view_delegate_view_(*delegate_view) { |
43 *delegate_view = this; | 45 *delegate_view = this; |
44 } | 46 } |
45 | 47 |
46 WebContentsViewGuest::~WebContentsViewGuest() { | 48 WebContentsViewGuest::~WebContentsViewGuest() { |
47 } | 49 } |
48 | 50 |
49 gfx::NativeView WebContentsViewGuest::GetNativeView() const { | 51 gfx::NativeView WebContentsViewGuest::GetNativeView() const { |
50 return platform_view_->GetNativeView(); | 52 return platform_view_->GetNativeView(); |
51 } | 53 } |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 embedder_render_view_host->GetDelegate()->GetDelegateView(); | 234 embedder_render_view_host->GetDelegate()->GetDelegateView(); |
233 if (view) { | 235 if (view) { |
234 RecordAction(base::UserMetricsAction("BrowserPlugin.Guest.StartDrag")); | 236 RecordAction(base::UserMetricsAction("BrowserPlugin.Guest.StartDrag")); |
235 view->StartDragging(drop_data, ops, image, image_offset, event_info); | 237 view->StartDragging(drop_data, ops, image, image_offset, event_info); |
236 } else { | 238 } else { |
237 embedder_web_contents->SystemDragEnded(); | 239 embedder_web_contents->SystemDragEnded(); |
238 } | 240 } |
239 } | 241 } |
240 | 242 |
241 } // namespace content | 243 } // namespace content |
OLD | NEW |