OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/arc/arc_kiosk_app_service.h> | 5 #include <chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_service.h> |
6 | 6 |
7 #include "base/time/time.h" | 7 #include "base/time/time.h" |
8 #include "chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_service_factory.h" | 8 #include "chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_service_factory.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/profiles/profile_manager.h" | 10 #include "chrome/browser/profiles/profile_manager.h" |
11 #include "chrome/browser/ui/app_list/arc/arc_app_utils.h" | 11 #include "chrome/browser/ui/app_list/arc/arc_app_utils.h" |
12 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" | 12 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" |
13 #include "chrome/common/pref_names.h" | 13 #include "chrome/common/pref_names.h" |
14 #include "components/prefs/pref_service.h" | 14 #include "components/prefs/pref_service.h" |
15 #include "ui/message_center/message_center.h" | 15 #include "ui/message_center/message_center.h" |
16 #include "ui/message_center/notification_blocker.h" | 16 #include "ui/message_center/notification_blocker.h" |
17 | 17 |
18 namespace chromeos { | 18 namespace chromeos { |
19 | 19 |
20 // Timeout maintenance session after 30 minutes. | 20 // Timeout maintenance session after 30 minutes. |
21 constexpr base::TimeDelta kArcKioskMaintenanceSessionTimeout = | 21 constexpr base::TimeDelta kArcKioskMaintenanceSessionTimeout = |
22 base::TimeDelta::FromMinutes(30); | 22 base::TimeDelta::FromMinutes(30); |
23 | 23 |
24 // Blocks all notifications for ARC++ Kiosk | 24 // Blocks all notifications for ARC Kiosk |
25 class ArcKioskNotificationBlocker : public message_center::NotificationBlocker { | 25 class ArcKioskNotificationBlocker : public message_center::NotificationBlocker { |
26 public: | 26 public: |
27 ArcKioskNotificationBlocker() | 27 ArcKioskNotificationBlocker() |
28 : message_center::NotificationBlocker( | 28 : message_center::NotificationBlocker( |
29 message_center::MessageCenter::Get()) { | 29 message_center::MessageCenter::Get()) { |
30 NotifyBlockingStateChanged(); | 30 NotifyBlockingStateChanged(); |
31 } | 31 } |
32 | 32 |
33 ~ArcKioskNotificationBlocker() override {} | 33 ~ArcKioskNotificationBlocker() override {} |
34 | 34 |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 ArcAppListPrefs::Get(profile_)->GetAppsForPackage( | 180 ArcAppListPrefs::Get(profile_)->GetAppsForPackage( |
181 app->app_info().package_name()); | 181 app->app_info().package_name()); |
182 if (app_ids.empty()) | 182 if (app_ids.empty()) |
183 return std::string(); | 183 return std::string(); |
184 // TODO(poromov@): Choose appropriate app id to launch. See | 184 // TODO(poromov@): Choose appropriate app id to launch. See |
185 // http://crbug.com/665904 | 185 // http://crbug.com/665904 |
186 return std::string(*app_ids.begin()); | 186 return std::string(*app_ids.begin()); |
187 } | 187 } |
188 | 188 |
189 } // namespace chromeos | 189 } // namespace chromeos |
OLD | NEW |