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

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

Issue 871443004: Expose the visibility state of a frame to the browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rfh_isfocused
Patch Set: rebase Created 5 years, 11 months 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/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 054b039fe8e6613d741c9402e046c0aefe493167..faaca99ae0e64f59d2bc2787ad6a0ae70f11dfd5 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -270,6 +270,16 @@ ServiceRegistry* RenderFrameHostImpl::GetServiceRegistry() {
return service_registry_.get();
}
+blink::WebPageVisibilityState RenderFrameHostImpl::GetVisibilityState() {
+ blink::WebPageVisibilityState visibility_state =
+ RenderWidgetHostImpl::From(GetView()->GetRenderWidgetHost())->is_hidden()
+ ? blink::WebPageVisibilityStateHidden
+ : blink::WebPageVisibilityStateVisible;
+ GetContentClient()->browser()->OverridePageVisibilityState(this,
+ &visibility_state);
+ return visibility_state;
+}
+
bool RenderFrameHostImpl::Send(IPC::Message* message) {
if (IPC_MESSAGE_ID_CLASS(message->type()) == InputMsgStart) {
return render_view_host_->input_router()->SendInput(
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/browser/frame_host/render_frame_host_impl_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698