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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: extensions/renderer/guest_view/extensions_iframe_guest_view_request.cc
diff --git a/extensions/renderer/guest_view/extensions_iframe_guest_view_request.cc b/extensions/renderer/guest_view/extensions_iframe_guest_view_request.cc
new file mode 100644
index 0000000000000000000000000000000000000000..4ef05d4fa638ca5e3232e94c792b7a4c6855d0a8
--- /dev/null
+++ b/extensions/renderer/guest_view/extensions_iframe_guest_view_request.cc
@@ -0,0 +1,50 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "extensions/renderer/guest_view/extensions_iframe_guest_view_request.h"
+
+#include "components/guest_view/renderer/guest_view_container.h"
+#include "content/public/renderer/render_frame.h"
+#include "extensions/common/guest_view/extensions_guest_view_messages.h"
+
+namespace extensions {
+
+GuestViewAttachIframeRequest::GuestViewAttachIframeRequest(
+ guest_view::GuestViewContainer* container,
+ int render_frame_routing_id,
+ int guest_instance_id,
+ scoped_ptr<base::DictionaryValue> params,
+ v8::Local<v8::Function> callback,
+ v8::Isolate* isolate)
+ : GuestViewRequest(container, callback, isolate),
+ render_frame_routing_id_(render_frame_routing_id),
+ guest_instance_id_(guest_instance_id),
+ params_(params.Pass()) {
+}
+
+GuestViewAttachIframeRequest::~GuestViewAttachIframeRequest() {
+}
+
+void GuestViewAttachIframeRequest::PerformRequest() {
+ LOG(WARNING)
+ << "GuestViewAttachIframeRequest::PerformRequest, guest_instance_id: "
+ << guest_instance_id_;
+ DCHECK(container()->render_frame());
+
+ container()->render_frame()->Send(
+ new ExtensionsGuestViewHostMsg_AttachToEmbedderFrame(
+ render_frame_routing_id_, container()->element_instance_id(),
+ guest_instance_id_, *params_));
+}
+
+void GuestViewAttachIframeRequest::HandleResponse(const IPC::Message& message) {
+ ExtensionsGuestViewMsg_AttachToEmbedderFrame_ACK::Param param;
+ bool message_read_status =
+ ExtensionsGuestViewMsg_AttachToEmbedderFrame_ACK::Read(&message, &param);
+ DCHECK(message_read_status);
+
+ ExecuteCallbackIfAvailable(0, nullptr);
+}
+
+} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698