OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2015 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. | |
4 | |
5 #ifndef CONTENT_BROWSER_MEDIA_CAPTURE_UI_ACTIVITY_TRACKER_H_ | |
6 #define CONTENT_BROWSER_MEDIA_CAPTURE_UI_ACTIVITY_TRACKER_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "base/memory/weak_ptr.h" | |
10 #include "content/common/content_export.h" | |
11 | |
12 namespace content { | |
13 | |
14 // UiActivityTracker is an interface that can be implememented to report | |
15 // whether the user is actively interacting with UI. | |
16 class CONTENT_EXPORT UiActivityTracker { | |
miu
2015/12/03 21:26:22
naming nit: Based on what this does, consider some
Irfan
2015/12/04 22:45:37
Done.
| |
17 public: | |
18 virtual ~UiActivityTracker() {} | |
19 | |
20 // Returns true if UI interaction is active. | |
21 virtual bool uiInteractionActive() const = 0; | |
miu
2015/12/03 21:26:22
style: No camel case. Suggestion: IsUiInteraction
Irfan
2015/12/04 22:45:37
Done.
| |
22 | |
23 // Resets any previous UI activity tracked. | |
24 virtual void reset() = 0; | |
miu
2015/12/03 21:26:22
Because it's non-inlined (and virtual), style requ
Irfan
2015/12/04 22:45:37
Done.
| |
25 | |
26 // Returns a weak pointer. | |
27 virtual base::WeakPtr<UiActivityTracker> GetWeakPtr() = 0; | |
28 }; | |
29 | |
30 } // namespace content | |
31 | |
32 #endif // CONTENT_BROWSER_MEDIA_CAPTURE_UI_ACTIVITY_TRACKER_H_ | |
OLD | NEW |