Index: extensions/renderer/guest_view/extensions_iframe_guest_view_container.cc |
diff --git a/extensions/renderer/guest_view/extensions_iframe_guest_view_container.cc b/extensions/renderer/guest_view/extensions_iframe_guest_view_container.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..396730347888d06808ff3f019c5e9995bf776d0e |
--- /dev/null |
+++ b/extensions/renderer/guest_view/extensions_iframe_guest_view_container.cc |
@@ -0,0 +1,40 @@ |
+// 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_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" |
+#include "extensions/common/guest_view/extensions_guest_view_messages.h" |
+ |
+namespace extensions { |
+ |
+ExtensionsIframeGuestViewContainer::ExtensionsIframeGuestViewContainer( |
+ content::RenderFrame* render_frame) |
+ : ExtensionsGuestViewContainer(render_frame), weak_ptr_factory_(this) { |
+ CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kSitePerProcess)); |
+ // There is no BrowserPluginDelegate to wait for. |
+ ready_ = true; |
+} |
+ |
+ExtensionsIframeGuestViewContainer::~ExtensionsIframeGuestViewContainer() { |
+} |
+ |
+bool ExtensionsIframeGuestViewContainer::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() != ExtensionsGuestViewMsg_AttachToEmbedderFrame_ACK::ID) |
+ return false; |
+ |
+ OnHandleCallback(message); |
+ return true; |
+} |
+ |
+} // namespace extensions |