Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1023)

Side by Side Diff: components/guest_view/renderer/iframe_guest_view_container.cc

Issue 1208143002: Move existing kSitePerProcess checks to a policy-oracle object (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@swapped_out_cmdline_checks
Patch Set: Attempt to fix compile. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "base/command_line.h"
8 #include "components/guest_view/common/guest_view_messages.h" 7 #include "components/guest_view/common/guest_view_messages.h"
9 #include "content/public/common/content_switches.h" 8 #include "content/public/common/browser_plugin_guest_mode.h"
10 #include "content/public/renderer/render_frame.h" 9 #include "content/public/renderer/render_frame.h"
11 10
12 namespace guest_view { 11 namespace guest_view {
13 12
14 IframeGuestViewContainer::IframeGuestViewContainer( 13 IframeGuestViewContainer::IframeGuestViewContainer(
15 content::RenderFrame* render_frame) 14 content::RenderFrame* render_frame)
16 : GuestViewContainer(render_frame) { 15 : GuestViewContainer(render_frame) {
17 CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch( 16 CHECK(content::BrowserPluginGuestMode::UseCrossProcessFramesForGuests());
18 switches::kSitePerProcess));
19 // There is no BrowserPluginDelegate to wait for. 17 // There is no BrowserPluginDelegate to wait for.
20 ready_ = true; 18 ready_ = true;
21 } 19 }
22 20
23 IframeGuestViewContainer::~IframeGuestViewContainer() { 21 IframeGuestViewContainer::~IframeGuestViewContainer() {
24 } 22 }
25 23
26 bool IframeGuestViewContainer::OnMessage(const IPC::Message& message) { 24 bool IframeGuestViewContainer::OnMessage(const IPC::Message& message) {
27 // TODO(lazyboy): Do not send this message in --site-per-process. 25 // TODO(lazyboy): Do not send this message in --site-per-process.
28 if (message.type() == GuestViewMsg_GuestAttached::ID) 26 if (message.type() == GuestViewMsg_GuestAttached::ID)
29 return true; 27 return true;
30 28
31 if (message.type() != GuestViewMsg_AttachToEmbedderFrame_ACK::ID) 29 if (message.type() != GuestViewMsg_AttachToEmbedderFrame_ACK::ID)
32 return false; 30 return false;
33 31
34 OnHandleCallback(message); 32 OnHandleCallback(message);
35 return true; 33 return true;
36 } 34 }
37 35
38 } // namespace guest_view 36 } // namespace guest_view
OLDNEW
« no previous file with comments | « components/guest_view/browser/guest_view_base.cc ('k') | content/browser/browser_plugin/browser_plugin_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698