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

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

Issue 1285373002: Ensure that Service Worker clients are always returned in MRU order (1) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Switch from activate to focus for ordering. Created 5 years, 4 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 a17e693b69a8212e8154b7ae2c42a8ff92cc8632..8379897e2c040ac27299388b21a8737fedc5c9fd 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -230,6 +230,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
// but it failed, thus HasFocus() returns false.
bool is_focused() const { return is_focused_; }
+ // Returns the time is_focused_ was last set to true.
+ base::TimeTicks LastFocusTime() const override;
+
// Called to notify the RenderWidget that it has lost the mouse lock.
virtual void LostMouseLock();
@@ -815,6 +818,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
// causing HasFocus to return false when is_focused_ is true.
bool is_focused_;
+ // Indicates the time when is_focused_ was last set to true.
+ base::TimeTicks last_focus_time_;
+
base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);

Powered by Google App Engine
This is Rietveld 408576698