Popular sites on the NTP: Try to keep the ordering constant
[chromium-blink-merge.git] / components / guest_view / renderer / iframe_guest_view_container.cc
blob36ca0b682b323bc19079b0ce08fe7c57c788410e
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.
18 ready_ = true;
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)
27 return true;
29 if (message.type() != GuestViewMsg_AttachToEmbedderFrame_ACK::ID)
30 return false;
32 OnHandleCallback(message);
33 return true;
36 } // namespace guest_view