Chromium Code Reviews| 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..994b4b8fad76bb1ec4bdb6118bc424ca8fa41932 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), |
| + is_mime_handler_view_guest_(delegate->IsMimeHandlerViewGuest()), |
| 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()) { |
|
Charlie Reis
2016/09/07 00:22:29
It's unclear to me why the old one still exists.
EhsanK
2016/09/08 18:14:57
I tried changing the only methods which were block
|
| + 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; |