| Index: content/browser/browser_plugin/browser_plugin_guest.cc
|
| diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc
|
| index d0a39e22c2d7afa3dcd1fddb5d72c12c4b03d299..9adc622f3ff6e546383f3620340cfb3d9857f192 100644
|
| --- a/content/browser/browser_plugin/browser_plugin_guest.cc
|
| +++ b/content/browser/browser_plugin/browser_plugin_guest.cc
|
| @@ -42,11 +42,11 @@
|
| #include "content/public/browser/browser_plugin_guest_manager.h"
|
| #include "content/public/browser/content_browser_client.h"
|
| #include "content/public/browser/guest_host.h"
|
| +#include "content/public/browser/guest_mode.h"
|
| #include "content/public/browser/render_process_host.h"
|
| #include "content/public/browser/render_widget_host_view.h"
|
| #include "content/public/browser/user_metrics.h"
|
| #include "content/public/browser/web_contents_observer.h"
|
| -#include "content/public/common/browser_plugin_guest_mode.h"
|
| #include "content/public/common/drop_data.h"
|
| #include "ui/gfx/geometry/size_conversions.h"
|
|
|
| @@ -105,6 +105,7 @@ BrowserPluginGuest::BrowserPluginGuest(bool has_render_view,
|
| seen_embedder_drag_source_ended_at_(false),
|
| ignore_dragged_url_(true),
|
| delegate_(delegate),
|
| + can_use_cross_process_frames_(delegate->CanUseCrossProcessFrames()),
|
| weak_ptr_factory_(this) {
|
| DCHECK(web_contents);
|
| DCHECK(delegate);
|
| @@ -114,7 +115,7 @@ BrowserPluginGuest::BrowserPluginGuest(bool has_render_view,
|
| }
|
|
|
| int BrowserPluginGuest::GetGuestProxyRoutingID() {
|
| - if (BrowserPluginGuestMode::UseCrossProcessFramesForGuests()) {
|
| + if (GuestMode::IsCrossProcessFrameGuest(GetWebContents())) {
|
| // We don't use the proxy to send postMessage in --site-per-process, since
|
| // we use the contentWindow directly from the frame element instead.
|
| return MSG_ROUTING_NONE;
|
| @@ -290,7 +291,7 @@ void BrowserPluginGuest::InitInternal(
|
|
|
| if (owner_web_contents_ != owner_web_contents) {
|
| WebContentsViewGuest* new_view = nullptr;
|
| - if (!BrowserPluginGuestMode::UseCrossProcessFramesForGuests()) {
|
| + if (!GuestMode::IsCrossProcessFrameGuest(GetWebContents())) {
|
| new_view =
|
| static_cast<WebContentsViewGuest*>(GetWebContents()->GetView());
|
| }
|
| @@ -677,9 +678,8 @@ bool BrowserPluginGuest::OnMessageReceived(const IPC::Message& message) {
|
| // TODO(lazyboy): Fix this as part of http://crbug.com/330264. The required
|
| // parts of code from this class should be extracted to a separate class for
|
| // --site-per-process.
|
| - if (BrowserPluginGuestMode::UseCrossProcessFramesForGuests()) {
|
| + if (GuestMode::IsCrossProcessFrameGuest(GetWebContents()))
|
| return false;
|
| - }
|
|
|
| IPC_BEGIN_MESSAGE_MAP(BrowserPluginGuest, message)
|
| IPC_MESSAGE_HANDLER(InputHostMsg_ImeCancelComposition,
|
| @@ -927,7 +927,7 @@ void BrowserPluginGuest::OnSetEditCommandsForNextKeyEvent(
|
| void BrowserPluginGuest::OnSetVisibility(int browser_plugin_instance_id,
|
| bool visible) {
|
| // For OOPIF-<webivew>, the remote frame will handle visibility state.
|
| - if (BrowserPluginGuestMode::UseCrossProcessFramesForGuests())
|
| + if (GuestMode::IsCrossProcessFrameGuest(GetWebContents()))
|
| return;
|
|
|
| guest_visible_ = visible;
|
|
|