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

Side by Side Diff: content/renderer/idle_user_detector.h

Issue 2621303004: Keep track of coalesced events in main thread event queue (Closed)
Patch Set: Rebase Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_RENDERER_IDLE_USER_DETECTOR_H_ 5 #ifndef CONTENT_RENDERER_IDLE_USER_DETECTOR_H_
6 #define CONTENT_RENDERER_IDLE_USER_DETECTOR_H_ 6 #define CONTENT_RENDERER_IDLE_USER_DETECTOR_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "content/common/input/input_event_dispatch_type.h" 9 #include "content/common/input/input_event_dispatch_type.h"
10 #include "content/public/renderer/render_view_observer.h" 10 #include "content/public/renderer/render_view_observer.h"
11 11
12 #include <vector>
13
12 namespace blink { 14 namespace blink {
13 class WebInputEvent; 15 class WebInputEvent;
14 } 16 }
15 17
16 namespace ui { 18 namespace ui {
17 class LatencyInfo; 19 class LatencyInfo;
18 } 20 }
19 21
20 namespace content { 22 namespace content {
21 23
22 // Class which observes user input events and postpones 24 // Class which observes user input events and postpones
23 // idle notifications if the user is active. 25 // idle notifications if the user is active.
24 class IdleUserDetector : public RenderViewObserver { 26 class IdleUserDetector : public RenderViewObserver {
25 public: 27 public:
26 IdleUserDetector(RenderView* render_view); 28 IdleUserDetector(RenderView* render_view);
27 ~IdleUserDetector() override; 29 ~IdleUserDetector() override;
28 30
29 private: 31 private:
30 // RenderViewObserver implementation: 32 // RenderViewObserver implementation:
31 bool OnMessageReceived(const IPC::Message& message) override; 33 bool OnMessageReceived(const IPC::Message& message) override;
32 void OnDestruct() override; 34 void OnDestruct() override;
33 35
34 void OnHandleInputEvent(const blink::WebInputEvent* event, 36 void OnHandleInputEvent(
35 const ui::LatencyInfo& latency_info, 37 const blink::WebInputEvent* event,
36 InputEventDispatchType dispatch_type); 38 const std::vector<const blink::WebInputEvent*>& coalesced_events,
39 const ui::LatencyInfo& latency_info,
40 InputEventDispatchType dispatch_type);
37 41
38 DISALLOW_COPY_AND_ASSIGN(IdleUserDetector); 42 DISALLOW_COPY_AND_ASSIGN(IdleUserDetector);
39 }; 43 };
40 44
41 } // namespace content 45 } // namespace content
42 46
43 #endif // CONTENT_RENDERER_IDLE_USER_DETECTOR_H_ 47 #endif // CONTENT_RENDERER_IDLE_USER_DETECTOR_H_
OLDNEW
« no previous file with comments | « content/renderer/gpu/gpu_benchmarking_extension.cc ('k') | content/renderer/idle_user_detector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698