| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/chromeos/app_mode/kiosk_mode_idle_app_name_notification
.h" | 5 #include "chrome/browser/chromeos/app_mode/kiosk_mode_idle_app_name_notification
.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/wm/user_activity_detector.h" | |
| 9 #include "base/bind.h" | 8 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 11 #include "base/logging.h" | 10 #include "base/logging.h" |
| 12 #include "chrome/browser/chromeos/login/user_manager.h" | 11 #include "chrome/browser/chromeos/login/user_manager.h" |
| 13 #include "chrome/browser/chromeos/ui/idle_app_name_notification_view.h" | 12 #include "chrome/browser/chromeos/ui/idle_app_name_notification_view.h" |
| 14 #include "chrome/browser/extensions/extension_service.h" | 13 #include "chrome/browser/extensions/extension_service.h" |
| 15 #include "chrome/browser/profiles/profile_manager.h" | 14 #include "chrome/browser/profiles/profile_manager.h" |
| 16 #include "chrome/common/chrome_switches.h" | 15 #include "chrome/common/chrome_switches.h" |
| 17 #include "chromeos/dbus/dbus_thread_manager.h" | 16 #include "chromeos/dbus/dbus_thread_manager.h" |
| 18 #include "extensions/browser/extension_system.h" | 17 #include "extensions/browser/extension_system.h" |
| 18 #include "ui/wm/core/user_activity_detector.h" |
| 19 | 19 |
| 20 namespace chromeos { | 20 namespace chromeos { |
| 21 | 21 |
| 22 namespace { | 22 namespace { |
| 23 | 23 |
| 24 // The timeout in ms before the message shows up. | 24 // The timeout in ms before the message shows up. |
| 25 const int kIdleAppNameNotificationTimeoutMs = 2 * 60 * 1000; | 25 const int kIdleAppNameNotificationTimeoutMs = 2 * 60 * 1000; |
| 26 | 26 |
| 27 // The duration of visibility for the message. | 27 // The duration of visibility for the message. |
| 28 const int kMessageVisibilityTimeMs = 3000; | 28 const int kMessageVisibilityTimeMs = 3000; |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 base::Bind(&KioskModeIdleAppNameNotification::OnTimeout, | 118 base::Bind(&KioskModeIdleAppNameNotification::OnTimeout, |
| 119 base::Unretained(this))); | 119 base::Unretained(this))); |
| 120 } | 120 } |
| 121 } | 121 } |
| 122 | 122 |
| 123 void KioskModeIdleAppNameNotification::OnTimeout() { | 123 void KioskModeIdleAppNameNotification::OnTimeout() { |
| 124 show_notification_upon_next_user_activity_ = true; | 124 show_notification_upon_next_user_activity_ = true; |
| 125 } | 125 } |
| 126 | 126 |
| 127 } // namespace chromeos | 127 } // namespace chromeos |
| OLD | NEW |