| 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..f0226d32bfc1f29becabc7ce13b024c745995070 100644
|
| --- a/content/browser/browser_plugin/browser_plugin_guest.cc
|
| +++ b/content/browser/browser_plugin/browser_plugin_guest.cc
|
| @@ -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 (guest_mode::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 (!guest_mode::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 (guest_mode::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 (guest_mode::IsCrossProcessFrameGuest(GetWebContents()))
|
| return;
|
|
|
| guest_visible_ = visible;
|
|
|