Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(631)

Side by Side Diff: extensions/renderer/guest_view/extensions_iframe_guest_view_request.cc

Issue 972313002: Make <webview> use out-of-process iframe architecture. (Closed) Base URL: ssh://saopaulo.wat/mnt/dev/shared/src@testoopif2z-better-chrome
Patch Set: Rebase after swapped out changes major rework with RFP Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "extensions/renderer/guest_view/extensions_iframe_guest_view_request.h"
6
7 #include "components/guest_view/renderer/guest_view_container.h"
8 #include "content/public/renderer/render_frame.h"
9 #include "extensions/common/guest_view/extensions_guest_view_messages.h"
10
11 namespace extensions {
12
13 GuestViewAttachIframeRequest::GuestViewAttachIframeRequest(
14 guest_view::GuestViewContainer* container,
15 int render_frame_routing_id,
16 int guest_instance_id,
17 scoped_ptr<base::DictionaryValue> params,
18 v8::Local<v8::Function> callback,
19 v8::Isolate* isolate)
20 : GuestViewRequest(container, callback, isolate),
21 render_frame_routing_id_(render_frame_routing_id),
22 guest_instance_id_(guest_instance_id),
23 params_(params.Pass()) {
24 }
25
26 GuestViewAttachIframeRequest::~GuestViewAttachIframeRequest() {
27 }
28
29 void GuestViewAttachIframeRequest::PerformRequest() {
30 LOG(WARNING)
31 << "GuestViewAttachIframeRequest::PerformRequest, guest_instance_id: "
32 << guest_instance_id_;
33 DCHECK(container()->render_frame());
34
35 container()->render_frame()->Send(
36 new ExtensionsGuestViewHostMsg_AttachToEmbedderFrame(
37 render_frame_routing_id_, container()->element_instance_id(),
38 guest_instance_id_, *params_));
39 }
40
41 void GuestViewAttachIframeRequest::HandleResponse(const IPC::Message& message) {
42 ExtensionsGuestViewMsg_AttachToEmbedderFrame_ACK::Param param;
43 bool message_read_status =
44 ExtensionsGuestViewMsg_AttachToEmbedderFrame_ACK::Read(&message, &param);
45 DCHECK(message_read_status);
46
47 ExecuteCallbackIfAvailable(0, nullptr);
48 }
49
50 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698