OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #include "components/guest_view/renderer/iframe_guest_view_container.h" |
| 6 |
| 7 #include "base/command_line.h" |
| 8 #include "components/guest_view/common/guest_view_messages.h" |
| 9 #include "content/public/common/content_switches.h" |
| 10 #include "content/public/renderer/render_frame.h" |
| 11 |
| 12 namespace guest_view { |
| 13 |
| 14 IframeGuestViewContainer::IframeGuestViewContainer( |
| 15 content::RenderFrame* render_frame) |
| 16 : GuestViewContainer(render_frame) { |
| 17 CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 18 switches::kSitePerProcess)); |
| 19 // There is no BrowserPluginDelegate to wait for. |
| 20 ready_ = true; |
| 21 } |
| 22 |
| 23 IframeGuestViewContainer::~IframeGuestViewContainer() { |
| 24 } |
| 25 |
| 26 bool IframeGuestViewContainer::OnMessage(const IPC::Message& message) { |
| 27 // TODO(lazyboy): Do not send this message in --site-per-process. |
| 28 if (message.type() == GuestViewMsg_GuestAttached::ID) |
| 29 return true; |
| 30 |
| 31 if (message.type() != GuestViewMsg_AttachToEmbedderFrame_ACK::ID) |
| 32 return false; |
| 33 |
| 34 OnHandleCallback(message); |
| 35 return true; |
| 36 } |
| 37 |
| 38 } // namespace guest_view |
OLD | NEW |