OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/renderer/guest_view/extensions_guest_view_container.h" | 5 #include "extensions/renderer/guest_view/extensions_guest_view_container.h" |
6 | 6 |
7 #include "content/public/renderer/render_frame.h" | 7 #include "content/public/renderer/render_frame.h" |
8 #include "content/public/renderer/render_view.h" | 8 #include "content/public/renderer/render_view.h" |
9 #include "extensions/common/guest_view/guest_view_constants.h" | 9 #include "extensions/common/guest_view/guest_view_constants.h" |
10 #include "extensions/common/guest_view/guest_view_messages.h" | 10 #include "extensions/common/guest_view/guest_view_messages.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 | 55 |
56 ExtensionsGuestViewContainer::AttachRequest::~AttachRequest() { | 56 ExtensionsGuestViewContainer::AttachRequest::~AttachRequest() { |
57 } | 57 } |
58 | 58 |
59 void ExtensionsGuestViewContainer::AttachRequest::PerformRequest() { | 59 void ExtensionsGuestViewContainer::AttachRequest::PerformRequest() { |
60 if (!container()->render_frame()) | 60 if (!container()->render_frame()) |
61 return; | 61 return; |
62 | 62 |
63 // Step 1, send the attach params to extensions/. | 63 // Step 1, send the attach params to extensions/. |
64 container()->render_frame()->Send( | 64 container()->render_frame()->Send( |
65 new GuestViewHostMsg_AttachGuest(container()->render_view_routing_id(), | 65 new GuestViewHostMsg_AttachGuest(container()->element_instance_id(), |
66 container()->element_instance_id(), | |
67 guest_instance_id_, | 66 guest_instance_id_, |
68 *params_)); | 67 *params_)); |
69 | 68 |
70 // Step 2, attach plugin through content/. | 69 // Step 2, attach plugin through content/. |
71 container()->render_frame()->AttachGuest(container()->element_instance_id()); | 70 container()->render_frame()->AttachGuest(container()->element_instance_id()); |
72 } | 71 } |
73 | 72 |
74 void ExtensionsGuestViewContainer::AttachRequest::HandleResponse( | 73 void ExtensionsGuestViewContainer::AttachRequest::HandleResponse( |
75 const IPC::Message& message) { | 74 const IPC::Message& message) { |
76 GuestViewMsg_GuestAttached::Param param; | 75 GuestViewMsg_GuestAttached::Param param; |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 } | 248 } |
250 | 249 |
251 void ExtensionsGuestViewContainer::HandlePendingResponseCallback( | 250 void ExtensionsGuestViewContainer::HandlePendingResponseCallback( |
252 const IPC::Message& message) { | 251 const IPC::Message& message) { |
253 CHECK(pending_response_.get()); | 252 CHECK(pending_response_.get()); |
254 linked_ptr<Request> pending_response(pending_response_.release()); | 253 linked_ptr<Request> pending_response(pending_response_.release()); |
255 pending_response->HandleResponse(message); | 254 pending_response->HandleResponse(message); |
256 } | 255 } |
257 | 256 |
258 } // namespace extensions | 257 } // namespace extensions |
OLD | NEW |