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_WINDOW_ACTIVITY_TRACKER_H_ |
| 6 #define CONTENT_BROWSER_MEDIA_CAPTURE_WINDOW_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 // WindowActivityTracker is an interface that can be implememented to report |
| 15 // whether the user is actively interacting with UI. |
| 16 class CONTENT_EXPORT WindowActivityTracker { |
| 17 public: |
| 18 virtual ~WindowActivityTracker() {} |
| 19 |
| 20 // Returns true if UI interaction is active. |
| 21 virtual bool IsUiInteractionActive() const = 0; |
| 22 |
| 23 // Resets any previous UI activity tracked. |
| 24 virtual void Reset() = 0; |
| 25 |
| 26 // Returns a weak pointer. |
| 27 virtual base::WeakPtr<WindowActivityTracker> GetWeakPtr() = 0; |
| 28 }; |
| 29 |
| 30 } // namespace content |
| 31 |
| 32 #endif // CONTENT_BROWSER_MEDIA_CAPTURE_WINDOW_ACTIVITY_TRACKER_H_ |
OLD | NEW |