Chromium Code Reviews| Index: content/browser/frame_host/cross_process_frame_connector.cc |
| diff --git a/content/browser/frame_host/cross_process_frame_connector.cc b/content/browser/frame_host/cross_process_frame_connector.cc |
| index aae77095658467e30fe8227f56b4eff7cbea9a06..8c53bf2f5548021bb528b34795a10cba25ca55a2 100644 |
| --- a/content/browser/frame_host/cross_process_frame_connector.cc |
| +++ b/content/browser/frame_host/cross_process_frame_connector.cc |
| @@ -13,6 +13,7 @@ |
| #include "content/browser/frame_host/render_frame_proxy_host.h" |
| #include "content/browser/frame_host/render_widget_host_view_child_frame.h" |
| #include "content/browser/renderer_host/render_view_host_impl.h" |
| +#include "content/browser/renderer_host/render_widget_host_delegate.h" |
| #include "content/browser/renderer_host/render_widget_host_impl.h" |
| #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| #include "content/common/frame_messages.h" |
| @@ -43,6 +44,7 @@ bool CrossProcessFrameConnector::OnMessageReceived(const IPC::Message& msg) { |
| OnReclaimCompositorResources) |
| IPC_MESSAGE_HANDLER(FrameHostMsg_ForwardInputEvent, OnForwardInputEvent) |
| IPC_MESSAGE_HANDLER(FrameHostMsg_FrameRectChanged, OnFrameRectChanged) |
| + IPC_MESSAGE_HANDLER(FrameHostMsg_VisibilityChanged, OnVisibilityChanged) |
| IPC_MESSAGE_HANDLER(FrameHostMsg_InitializeChildFrame, |
| OnInitializeChildFrame) |
| IPC_MESSAGE_HANDLER(FrameHostMsg_SatisfySequence, OnSatisfySequence) |
| @@ -216,6 +218,19 @@ void CrossProcessFrameConnector::OnFrameRectChanged( |
| SetSize(frame_rect); |
| } |
| +void CrossProcessFrameConnector::OnVisibilityChanged(bool visible) { |
| + if (!view_) |
| + return; |
| + if (static_cast<RenderWidgetHostImpl*>(view_->GetRenderWidgetHost()) |
|
lazyboy
2015/11/11 22:04:27
1) If you only want to check if this is for a gues
EhsanK
2015/11/12 19:54:30
Done.
|
| + ->delegate() |
| + ->DidForwardVisibilityChangeToGuest(visible)) |
| + return; |
| + if (visible) |
| + view_->Show(); |
| + else |
| + view_->Hide(); |
| +} |
| + |
| void CrossProcessFrameConnector::SetDeviceScaleFactor(float scale_factor) { |
| device_scale_factor_ = scale_factor; |
| // The RenderWidgetHost is null in unit tests. |