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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.h

Issue 898443003: Use RWH instead of RWHV to know whether a frame is focus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/renderer_host/render_widget_host_impl.h
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index 99f2aa3433e4051de1d0b20b9571d2c1a71d742a..12e92b7b2e19de8d2cc20bb45e0a24858636f1c8 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -228,6 +228,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
virtual void GotFocus();
virtual void LostCapture();
+ // Indicates whether the frame is currently focused.
+ bool is_focused() const { return is_focused_; }
+
// Called to notify the RenderWidget that it has lost the mouse lock.
virtual void LostMouseLock();
@@ -841,6 +844,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl
// object does not self destroy.
bool owned_by_render_frame_host_;
+ bool is_focused_;
Charlie Reis 2015/02/02 18:03:55 It's getting hard to track why we need this here.
mlamouri (slow - plz ping) 2015/02/02 18:21:15 Basically, RWH focus isn't linked to the system wh
+
base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);

Powered by Google App Engine
This is Rietveld 408576698