OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/arc/arc_service_manager.h" | 5 #include "components/arc/arc_service_manager.h" |
6 | 6 |
7 #include "base/sequenced_task_runner.h" | 7 #include "base/sequenced_task_runner.h" |
8 #include "base/thread_task_runner_handle.h" | 8 #include "base/thread_task_runner_handle.h" |
9 #include "components/arc/arc_bridge_bootstrap.h" | 9 #include "components/arc/arc_bridge_bootstrap.h" |
10 #include "components/arc/arc_bridge_service_impl.h" | 10 #include "components/arc/arc_bridge_service_impl.h" |
11 #include "components/arc/input/arc_input_bridge.h" | 11 #include "components/arc/input/arc_input_bridge.h" |
12 #include "components/arc/power/arc_power_bridge.h" | 12 #include "components/arc/power/arc_power_bridge.h" |
13 #include "components/arc/settings/arc_settings_bridge.h" | 13 #include "components/arc/settings/arc_settings_bridge.h" |
| 14 #include "ui/arc/notification/arc_notification_manager.h" |
14 | 15 |
15 namespace arc { | 16 namespace arc { |
16 | 17 |
17 namespace { | 18 namespace { |
18 | 19 |
19 // Weak pointer. This class is owned by ChromeBrowserMainPartsChromeos. | 20 // Weak pointer. This class is owned by ChromeBrowserMainPartsChromeos. |
20 ArcServiceManager* g_arc_service_manager = nullptr; | 21 ArcServiceManager* g_arc_service_manager = nullptr; |
21 | 22 |
22 } // namespace | 23 } // namespace |
23 | 24 |
(...skipping 21 matching lines...) Expand all Loading... |
45 DCHECK(g_arc_service_manager); | 46 DCHECK(g_arc_service_manager); |
46 DCHECK(g_arc_service_manager->thread_checker_.CalledOnValidThread()); | 47 DCHECK(g_arc_service_manager->thread_checker_.CalledOnValidThread()); |
47 return g_arc_service_manager; | 48 return g_arc_service_manager; |
48 } | 49 } |
49 | 50 |
50 ArcBridgeService* ArcServiceManager::arc_bridge_service() { | 51 ArcBridgeService* ArcServiceManager::arc_bridge_service() { |
51 DCHECK(thread_checker_.CalledOnValidThread()); | 52 DCHECK(thread_checker_.CalledOnValidThread()); |
52 return arc_bridge_service_.get(); | 53 return arc_bridge_service_.get(); |
53 } | 54 } |
54 | 55 |
| 56 void ArcServiceManager::OnPrimaryUserProfilePrepared( |
| 57 const AccountId& account_id) { |
| 58 DCHECK(thread_checker_.CalledOnValidThread()); |
| 59 |
| 60 arc_notification_manager_.reset( |
| 61 new ArcNotificationManager(arc_bridge_service(), account_id)); |
| 62 } |
| 63 |
55 } // namespace arc | 64 } // namespace arc |
OLD | NEW |