Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(335)

Unified Diff: content/browser/frame_host/cross_process_frame_connector.cc

Issue 1414663011: Notifying the Out of Process Renderer about Visibility Change of a Remote Frame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..1a92ca4130605c4eaa8da66607d3c3402f7dc816 100644
--- a/content/browser/frame_host/cross_process_frame_connector.cc
+++ b/content/browser/frame_host/cross_process_frame_connector.cc
@@ -43,6 +43,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 +217,12 @@ void CrossProcessFrameConnector::OnFrameRectChanged(
SetSize(frame_rect);
}
+void CrossProcessFrameConnector::OnVisibilityChanged(bool visible) {
+ if (!view_)
+ return;
+ view_->SetVisibility(visible);
kenrb 2015/11/04 21:57:42 Why not just call Show() or Hide() directly, rathe
EhsanK 2015/11/05 15:57:39 This is a provision for <webview>. My understandin
kenrb 2015/11/11 16:09:33 This sounds a bit hacky, but I don't know the <web
EhsanK 2015/11/11 19:13:18 Done. I will also add Istiaque to take a look at t
+}
+
void CrossProcessFrameConnector::SetDeviceScaleFactor(float scale_factor) {
device_scale_factor_ = scale_factor;
// The RenderWidgetHost is null in unit tests.

Powered by Google App Engine
This is Rietveld 408576698