| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "ash/system/power/video_activity_notifier.h" | 5 #include "ash/system/power/video_activity_notifier.h" |
| 6 | 6 |
| 7 #include "ash/session/session_controller.h" | 7 #include "ash/session/session_controller.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/wm_shell.h" | |
| 10 #include "chromeos/dbus/dbus_thread_manager.h" | 9 #include "chromeos/dbus/dbus_thread_manager.h" |
| 11 #include "chromeos/dbus/power_manager_client.h" | 10 #include "chromeos/dbus/power_manager_client.h" |
| 12 | 11 |
| 13 namespace ash { | 12 namespace ash { |
| 14 namespace { | 13 namespace { |
| 15 | 14 |
| 16 // Minimum number of seconds between repeated notifications of the same state. | 15 // Minimum number of seconds between repeated notifications of the same state. |
| 17 // This should be less than powerd's timeout for determining whether video is | 16 // This should be less than powerd's timeout for determining whether video is |
| 18 // still active for the purposes of controlling the keyboard backlight. | 17 // still active for the purposes of controlling the keyboard backlight. |
| 19 const int kNotifyIntervalSec = 5; | 18 const int kNotifyIntervalSec = 5; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 void VideoActivityNotifier::MaybeNotifyPowerManager() { | 72 void VideoActivityNotifier::MaybeNotifyPowerManager() { |
| 74 if (should_notify_power_manager()) { | 73 if (should_notify_power_manager()) { |
| 75 chromeos::DBusThreadManager::Get() | 74 chromeos::DBusThreadManager::Get() |
| 76 ->GetPowerManagerClient() | 75 ->GetPowerManagerClient() |
| 77 ->NotifyVideoActivity(video_state_ == | 76 ->NotifyVideoActivity(video_state_ == |
| 78 VideoDetector::State::PLAYING_FULLSCREEN); | 77 VideoDetector::State::PLAYING_FULLSCREEN); |
| 79 } | 78 } |
| 80 } | 79 } |
| 81 | 80 |
| 82 } // namespace ash | 81 } // namespace ash |
| OLD | NEW |