| Index: content/public/browser/guest_mode.cc
|
| diff --git a/content/public/browser/guest_mode.cc b/content/public/browser/guest_mode.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..8fd1a91fd6319dca0a6e50486e56539bf3cefde3
|
| --- /dev/null
|
| +++ b/content/public/browser/guest_mode.cc
|
| @@ -0,0 +1,32 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "content/public/browser/guest_mode.h"
|
| +
|
| +#include "content/browser/browser_plugin/browser_plugin_guest.h"
|
| +#include "content/browser/web_contents/web_contents_impl.h"
|
| +#include "content/public/browser/web_contents.h"
|
| +#include "content/public/common/browser_plugin_guest_mode.h"
|
| +
|
| +namespace content {
|
| +
|
| +// static
|
| +bool GuestMode::IsInnerWebContentsUsingCrossProcessFrames(
|
| + WebContents* web_contents) {
|
| + if (!BrowserPluginGuestMode::UseCrossProcessFramesForGuests())
|
| + return false;
|
| + BrowserPluginGuest* browser_plugin_guest =
|
| + static_cast<WebContentsImpl*>(web_contents)->GetBrowserPluginGuest();
|
| + return browser_plugin_guest &&
|
| + browser_plugin_guest->can_use_cross_process_frames();
|
| +}
|
| +
|
| +// static
|
| +bool GuestMode::ForInnerWebContentsUsingCrossProcessFrames(
|
| + RenderViewHost* rvh) {
|
| + return IsInnerWebContentsUsingCrossProcessFrames(
|
| + WebContents::FromRenderViewHost(rvh));
|
| +}
|
| +
|
| +} // namespace content
|
|
|