Roll WebRTC 9189:9205, Libjingle 9186:9198
[chromium-blink-merge.git] / content / renderer / idle_user_detector.h
blob86a7eac6f355f630481acf83e7314d0b5f8e6c09
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_RENDERER_IDLE_USER_DETECTOR_H_
6 #define CONTENT_RENDERER_IDLE_USER_DETECTOR_H_
8 #include "base/basictypes.h"
9 #include "content/public/renderer/render_view_observer.h"
11 namespace blink {
12 class WebInputEvent;
15 namespace ui {
16 struct LatencyInfo;
19 namespace content {
21 // Class which observes user input events and postpones
22 // idle notifications if the user is active.
23 class IdleUserDetector : public RenderViewObserver {
24 public:
25 IdleUserDetector(RenderView* render_view);
26 ~IdleUserDetector() override;
28 private:
29 // RenderViewObserver implementation:
30 bool OnMessageReceived(const IPC::Message& message) override;
32 void OnHandleInputEvent(const blink::WebInputEvent* event,
33 const ui::LatencyInfo& latency_info,
34 bool is_keyboard_shortcut);
36 DISALLOW_COPY_AND_ASSIGN(IdleUserDetector);
39 } // namespace content
41 #endif // CONTENT_RENDERER_IDLE_USER_DETECTOR_H_