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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 223
224 // Indicates whether the RenderWidgetHost thinks it is focused. 224 // Indicates whether the RenderWidgetHost thinks it is focused.
225 // This is different from RenderWidgetHostView::HasFocus() in the sense that 225 // This is different from RenderWidgetHostView::HasFocus() in the sense that
226 // it reflects what the renderer process knows: it saves the state that is 226 // it reflects what the renderer process knows: it saves the state that is
227 // sent/received. 227 // sent/received.
228 // RenderWidgetHostView::HasFocus() is checking whether the view is focused so 228 // RenderWidgetHostView::HasFocus() is checking whether the view is focused so
229 // it is possible in some edge cases that a view was requested to be focused 229 // it is possible in some edge cases that a view was requested to be focused
230 // but it failed, thus HasFocus() returns false. 230 // but it failed, thus HasFocus() returns false.
231 bool is_focused() const { return is_focused_; } 231 bool is_focused() const { return is_focused_; }
232 232
233 // Returns the time is_focused_ was last set to true.
234 base::TimeTicks LastFocusTime() const override;
235
233 // Called to notify the RenderWidget that it has lost the mouse lock. 236 // Called to notify the RenderWidget that it has lost the mouse lock.
234 virtual void LostMouseLock(); 237 virtual void LostMouseLock();
235 238
236 // Noifies the RenderWidget of the current mouse cursor visibility state. 239 // Noifies the RenderWidget of the current mouse cursor visibility state.
237 void SendCursorVisibilityState(bool is_visible); 240 void SendCursorVisibilityState(bool is_visible);
238 241
239 // Notifies the RenderWidgetHost that the View was destroyed. 242 // Notifies the RenderWidgetHost that the View was destroyed.
240 void ViewDestroyed(); 243 void ViewDestroyed();
241 244
242 #if defined(OS_MACOSX) 245 #if defined(OS_MACOSX)
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 // Indicates whether a RenderFramehost has ownership, in which case this 811 // Indicates whether a RenderFramehost has ownership, in which case this
809 // object does not self destroy. 812 // object does not self destroy.
810 bool owned_by_render_frame_host_; 813 bool owned_by_render_frame_host_;
811 814
812 // Indicates whether this RenderWidgetHost thinks is focused. This is trying 815 // Indicates whether this RenderWidgetHost thinks is focused. This is trying
813 // to match what the renderer process knows. It is different from 816 // to match what the renderer process knows. It is different from
814 // RenderWidgetHostView::HasFocus in that in that the focus request may fail, 817 // RenderWidgetHostView::HasFocus in that in that the focus request may fail,
815 // causing HasFocus to return false when is_focused_ is true. 818 // causing HasFocus to return false when is_focused_ is true.
816 bool is_focused_; 819 bool is_focused_;
817 820
821 // Indicates the time when is_focused_ was last set to true.
822 base::TimeTicks last_focus_time_;
823
818 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; 824 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_;
819 825
820 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 826 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
821 }; 827 };
822 828
823 } // namespace content 829 } // namespace content
824 830
825 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 831 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698