OLD | NEW |
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 ASH_WM_VIDEO_DETECTOR_H_ | 5 #ifndef ASH_WM_VIDEO_DETECTOR_H_ |
6 #define ASH_WM_VIDEO_DETECTOR_H_ | 6 #define ASH_WM_VIDEO_DETECTOR_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 namespace gfx { | 24 namespace gfx { |
25 class Rect; | 25 class Rect; |
26 } | 26 } |
27 | 27 |
28 namespace ash { | 28 namespace ash { |
29 | 29 |
30 class ASH_EXPORT VideoDetectorObserver { | 30 class ASH_EXPORT VideoDetectorObserver { |
31 public: | 31 public: |
32 // Invoked periodically while a video is being played onscreen. | 32 // Invoked periodically while a video is being played onscreen. |
33 virtual void OnVideoDetected() = 0; | 33 virtual void OnVideoDetected(bool is_fullscreen) = 0; |
34 | 34 |
35 protected: | 35 protected: |
36 virtual ~VideoDetectorObserver() {} | 36 virtual ~VideoDetectorObserver() {} |
37 }; | 37 }; |
38 | 38 |
39 // Watches for updates to windows and tries to detect when a video is playing. | 39 // Watches for updates to windows and tries to detect when a video is playing. |
40 // We err on the side of false positives and can be fooled by things like | 40 // We err on the side of false positives and can be fooled by things like |
41 // continuous scrolling of a page. | 41 // continuous scrolling of a page. |
42 class ASH_EXPORT VideoDetector : public aura::EnvObserver, | 42 class ASH_EXPORT VideoDetector : public aura::EnvObserver, |
43 public aura::WindowObserver { | 43 public aura::WindowObserver { |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 base::TimeTicks now_for_test_; | 93 base::TimeTicks now_for_test_; |
94 | 94 |
95 ScopedObserver<aura::Window, aura::WindowObserver> observer_manager_; | 95 ScopedObserver<aura::Window, aura::WindowObserver> observer_manager_; |
96 | 96 |
97 DISALLOW_COPY_AND_ASSIGN(VideoDetector); | 97 DISALLOW_COPY_AND_ASSIGN(VideoDetector); |
98 }; | 98 }; |
99 | 99 |
100 } // namespace ash | 100 } // namespace ash |
101 | 101 |
102 #endif // ASH_WM_VIDEO_DETECTOR_H_ | 102 #endif // ASH_WM_VIDEO_DETECTOR_H_ |
OLD | NEW |