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

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: remove from RFH 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 4093fa9f698f325c21289150288f9486a3475abc..7f4f1891467ace3af2642b72f3bef6efe6ae64e7 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -1477,6 +1477,15 @@ bool RenderFrameHostImpl::IsFocused() const {
frame_tree_->GetFocusedFrame()->current_frame_host() == this;
}
+blink::WebPageVisibilityState RenderFrameHostImpl::GetVisibilityState() {
+ if (GetContentClient()->browser()->IsPrerendering(this))
+ return blink::WebPageVisibilityStatePrerender;
+
+ return GetRenderWidgetHost()->is_hidden()
+ ? blink::WebPageVisibilityStateHidden
Charlie Reis 2015/01/22 21:03:55 This indent doesn't seem right. I would have done
mlamouri (slow - plz ping) 2015/01/23 12:32:57 Fixed.
+ : blink::WebPageVisibilityStateVisible;
+}
+
void RenderFrameHostImpl::UpdateCrossProcessIframeAccessibility(
const std::map<int32, int>& node_to_frame_routing_id_map) {
for (const auto& iter : node_to_frame_routing_id_map) {

Powered by Google App Engine
This is Rietveld 408576698