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.
5 #include "components/guest_view/renderer/iframe_guest_view_container.h"
7 #include "components/guest_view/common/guest_view_messages.h"
8 #include "content/public/common/browser_plugin_guest_mode.h"
9 #include "content/public/renderer/render_frame.h"
11 namespace guest_view
{
13 IframeGuestViewContainer::IframeGuestViewContainer(
14 content::RenderFrame
* render_frame
)
15 : GuestViewContainer(render_frame
) {
16 CHECK(content::BrowserPluginGuestMode::UseCrossProcessFramesForGuests());
17 // There is no BrowserPluginDelegate to wait for.
21 IframeGuestViewContainer::~IframeGuestViewContainer() {
24 bool IframeGuestViewContainer::OnMessage(const IPC::Message
& message
) {
25 // TODO(lazyboy): Do not send this message in --site-per-process.
26 if (message
.type() == GuestViewMsg_GuestAttached::ID
)
29 if (message
.type() != GuestViewMsg_AttachToEmbedderFrame_ACK::ID
)
32 OnHandleCallback(message
);
36 } // namespace guest_view