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

Unified Diff: components/guest_view/renderer/iframe_guest_view_container.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: sync 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: components/guest_view/renderer/iframe_guest_view_container.cc
diff --git a/components/guest_view/renderer/iframe_guest_view_container.cc b/components/guest_view/renderer/iframe_guest_view_container.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f26738304cccaa89374e12406b7ac54deb76a340
--- /dev/null
+++ b/components/guest_view/renderer/iframe_guest_view_container.cc
@@ -0,0 +1,38 @@
+// 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 "components/guest_view/renderer/iframe_guest_view_container.h"
+
+#include "base/command_line.h"
+#include "components/guest_view/common/guest_view_messages.h"
+#include "content/public/common/content_switches.h"
+#include "content/public/renderer/render_frame.h"
+
+namespace guest_view {
+
+IframeGuestViewContainer::IframeGuestViewContainer(
+ content::RenderFrame* render_frame)
+ : GuestViewContainer(render_frame) {
+ CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kSitePerProcess));
+ // There is no BrowserPluginDelegate to wait for.
+ ready_ = true;
+}
+
+IframeGuestViewContainer::~IframeGuestViewContainer() {
+}
+
+bool IframeGuestViewContainer::OnMessage(const IPC::Message& message) {
+ // TODO(lazyboy): Do not send this message in --site-per-process.
+ if (message.type() == GuestViewMsg_GuestAttached::ID)
+ return true;
+
+ if (message.type() != GuestViewMsg_AttachToEmbedderFrame_ACK::ID)
+ return false;
+
+ OnHandleCallback(message);
+ return true;
+}
+
+} // namespace guest_view

Powered by Google App Engine
This is Rietveld 408576698