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 #include <memory> | 9 #include <memory> |
10 #include <set> | 10 #include <set> |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 void OnDelegatedFrameDamage(aura::Window* window, | 97 void OnDelegatedFrameDamage(aura::Window* window, |
98 const gfx::Rect& region) override; | 98 const gfx::Rect& region) override; |
99 void OnWindowDestroyed(aura::Window* window) override; | 99 void OnWindowDestroyed(aura::Window* window) override; |
100 void OnWindowDestroying(aura::Window* window) override; | 100 void OnWindowDestroying(aura::Window* window) override; |
101 | 101 |
102 // SessionStateController overrides. | 102 // SessionStateController overrides. |
103 void OnChromeTerminating() override; | 103 void OnChromeTerminating() override; |
104 | 104 |
105 // ShellObserver overrides. | 105 // ShellObserver overrides. |
106 void OnFullscreenStateChanged(bool is_fullscreen, | 106 void OnFullscreenStateChanged(bool is_fullscreen, |
107 WmWindow* root_window) override; | 107 aura::Window* root_window) override; |
108 | 108 |
109 private: | 109 private: |
110 // Called when video activity is observed in |window|. | 110 // Called when video activity is observed in |window|. |
111 void HandleVideoActivity(aura::Window* window, base::TimeTicks now); | 111 void HandleVideoActivity(aura::Window* window, base::TimeTicks now); |
112 | 112 |
113 // Called by |inactive_timer_| |kVideoTimeoutMs| after the last-observed video | 113 // Called by |inactive_timer_| |kVideoTimeoutMs| after the last-observed video |
114 // activity. | 114 // activity. |
115 void HandleVideoInactive(); | 115 void HandleVideoInactive(); |
116 | 116 |
117 // Updates |state_| and notifies |observers_| if it changed. | 117 // Updates |state_| and notifies |observers_| if it changed. |
(...skipping 26 matching lines...) Expand all Loading... |
144 ScopedSessionObserver scoped_session_observer_; | 144 ScopedSessionObserver scoped_session_observer_; |
145 | 145 |
146 bool is_shutting_down_; | 146 bool is_shutting_down_; |
147 | 147 |
148 DISALLOW_COPY_AND_ASSIGN(VideoDetector); | 148 DISALLOW_COPY_AND_ASSIGN(VideoDetector); |
149 }; | 149 }; |
150 | 150 |
151 } // namespace ash | 151 } // namespace ash |
152 | 152 |
153 #endif // ASH_WM_VIDEO_DETECTOR_H_ | 153 #endif // ASH_WM_VIDEO_DETECTOR_H_ |
OLD | NEW |