Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(355)

Side by Side Diff: chrome/browser/chromeos/app_mode/kiosk_mode_idle_app_name_notification.h

Issue 222383002: Move UserActivityDetector from ash/wm/ to ui/wm/core/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove an unneeded include Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #ifndef CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_MODE_IDLE_APP_NAME_NOTIFICATION_H _ 5 #ifndef CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_MODE_IDLE_APP_NAME_NOTIFICATION_H _
6 #define CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_MODE_IDLE_APP_NAME_NOTIFICATION_H _ 6 #define CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_MODE_IDLE_APP_NAME_NOTIFICATION_H _
7 7
8 #include "ash/wm/user_activity_observer.h"
9 #include "base/basictypes.h" 8 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
11 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
12 #include "base/timer/timer.h" 11 #include "base/timer/timer.h"
13 #include "chromeos/dbus/power_manager_client.h" 12 #include "chromeos/dbus/power_manager_client.h"
13 #include "ui/wm/core/user_activity_observer.h"
14 14
15 namespace chromeos { 15 namespace chromeos {
16 class IdleAppNameNotificationView; 16 class IdleAppNameNotificationView;
17 17
18 class KioskModeIdleAppNameNotification : public ash::UserActivityObserver, 18 class KioskModeIdleAppNameNotification : public wm::UserActivityObserver,
19 public PowerManagerClient::Observer { 19 public PowerManagerClient::Observer {
20 public: 20 public:
21 static void Initialize(); 21 static void Initialize();
22 22
23 static void Shutdown(); 23 static void Shutdown();
24 24
25 KioskModeIdleAppNameNotification(); 25 KioskModeIdleAppNameNotification();
26 virtual ~KioskModeIdleAppNameNotification(); 26 virtual ~KioskModeIdleAppNameNotification();
27 27
28 private: 28 private:
29 // Initialize idle app message when KioskModeHelper is initialized. 29 // Initialize idle app message when KioskModeHelper is initialized.
30 void Setup(); 30 void Setup();
31 31
32 // UserActivityObserver overrides: 32 // wm::UserActivityObserver overrides:
33 virtual void OnUserActivity(const ui::Event* event) OVERRIDE; 33 virtual void OnUserActivity(const ui::Event* event) OVERRIDE;
34 34
35 // PowerManagerClient::Observer overrides: 35 // PowerManagerClient::Observer overrides:
36 virtual void SystemResumed(const base::TimeDelta& sleep_duration) OVERRIDE; 36 virtual void SystemResumed(const base::TimeDelta& sleep_duration) OVERRIDE;
37 37
38 // Begins listening for user activity and calls ResetTimer(). 38 // Begins listening for user activity and calls ResetTimer().
39 void Start(); 39 void Start();
40 40
41 // Resets |timer_| to fire when the application idle message should be shown. 41 // Resets |timer_| to fire when the application idle message should be shown.
42 void ResetTimer(); 42 void ResetTimer();
43 43
44 // Invoked by |timer_| to display the application idle message. 44 // Invoked by |timer_| to display the application idle message.
45 void OnTimeout(); 45 void OnTimeout();
46 46
47 base::OneShotTimer<KioskModeIdleAppNameNotification> timer_; 47 base::OneShotTimer<KioskModeIdleAppNameNotification> timer_;
48 48
49 // If set the notification should get shown upon next user activity. 49 // If set the notification should get shown upon next user activity.
50 bool show_notification_upon_next_user_activity_; 50 bool show_notification_upon_next_user_activity_;
51 51
52 // The notification object which owns and shows the notification. 52 // The notification object which owns and shows the notification.
53 scoped_ptr<IdleAppNameNotificationView> notification_; 53 scoped_ptr<IdleAppNameNotificationView> notification_;
54 54
55 DISALLOW_COPY_AND_ASSIGN(KioskModeIdleAppNameNotification); 55 DISALLOW_COPY_AND_ASSIGN(KioskModeIdleAppNameNotification);
56 }; 56 };
57 57
58 } // namespace chromeos 58 } // namespace chromeos
59 59
60 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_MODE_IDLE_APP_NAME_NOTIFICATIO N_H_ 60 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_MODE_IDLE_APP_NAME_NOTIFICATIO N_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698