OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/guest_view/renderer/iframe_guest_view_container.h" | 5 #include "components/guest_view/renderer/iframe_guest_view_container.h" |
6 | 6 |
7 #include "components/guest_view/common/guest_view_messages.h" | 7 #include "components/guest_view/common/guest_view_messages.h" |
8 #include "content/public/common/browser_plugin_guest_mode.h" | 8 #include "content/public/renderer/guest_mode.h" |
9 #include "content/public/renderer/render_frame.h" | 9 #include "content/public/renderer/render_frame.h" |
10 | 10 |
11 namespace guest_view { | 11 namespace guest_view { |
12 | 12 |
13 IframeGuestViewContainer::IframeGuestViewContainer( | 13 IframeGuestViewContainer::IframeGuestViewContainer( |
14 content::RenderFrame* render_frame) | 14 content::RenderFrame* render_frame) |
15 : GuestViewContainer(render_frame) { | 15 : GuestViewContainer(render_frame) { |
16 CHECK(content::BrowserPluginGuestMode::UseCrossProcessFramesForGuests()); | 16 CHECK(content::GuestMode::UseCrossProcessFramesForGuests()); |
17 // There is no BrowserPluginDelegate to wait for. | 17 // There is no BrowserPluginDelegate to wait for. |
18 ready_ = true; | 18 ready_ = true; |
19 } | 19 } |
20 | 20 |
21 IframeGuestViewContainer::~IframeGuestViewContainer() { | 21 IframeGuestViewContainer::~IframeGuestViewContainer() { |
22 } | 22 } |
23 | 23 |
24 bool IframeGuestViewContainer::OnMessage(const IPC::Message& message) { | 24 bool IframeGuestViewContainer::OnMessage(const IPC::Message& message) { |
25 // TODO(lazyboy): Do not send this message in --site-per-process. | 25 // TODO(lazyboy): Do not send this message in --site-per-process. |
26 if (message.type() == GuestViewMsg_GuestAttached::ID) | 26 if (message.type() == GuestViewMsg_GuestAttached::ID) |
27 return true; | 27 return true; |
28 | 28 |
29 if (message.type() != GuestViewMsg_AttachToEmbedderFrame_ACK::ID) | 29 if (message.type() != GuestViewMsg_AttachToEmbedderFrame_ACK::ID) |
30 return false; | 30 return false; |
31 | 31 |
32 OnHandleCallback(message); | 32 OnHandleCallback(message); |
33 return true; | 33 return true; |
34 } | 34 } |
35 | 35 |
36 } // namespace guest_view | 36 } // namespace guest_view |
OLD | NEW |