| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/sequenced_task_runner.h" | 9 #include "base/sequenced_task_runner.h" |
| 10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
| 11 #include "components/arc/arc_bridge_bootstrap.h" | 11 #include "components/arc/arc_bridge_bootstrap.h" |
| 12 #include "components/arc/arc_bridge_service_impl.h" | 12 #include "components/arc/arc_bridge_service_impl.h" |
| 13 #include "components/arc/auth/arc_auth_service.h" | 13 #include "components/arc/auth/arc_auth_service.h" |
| 14 #include "components/arc/clipboard/arc_clipboard_bridge.h" | 14 #include "components/arc/clipboard/arc_clipboard_bridge.h" |
| 15 #include "components/arc/input/arc_input_bridge.h" | 15 #include "components/arc/input/arc_input_bridge.h" |
| 16 #include "components/arc/power/arc_power_bridge.h" | 16 #include "components/arc/power/arc_power_bridge.h" |
| 17 #include "components/arc/settings/arc_settings_bridge.h" | 17 #include "components/arc/settings/arc_settings_bridge.h" |
| 18 #include "components/arc/video/arc_video_bridge.h" | 18 #include "components/arc/video/arc_video_bridge.h" |
| 19 #include "ui/arc/notification/arc_notification_manager.h" |
| 19 | 20 |
| 20 namespace arc { | 21 namespace arc { |
| 21 | 22 |
| 22 namespace { | 23 namespace { |
| 23 | 24 |
| 24 // Weak pointer. This class is owned by ChromeBrowserMainPartsChromeos. | 25 // Weak pointer. This class is owned by ChromeBrowserMainPartsChromeos. |
| 25 ArcServiceManager* g_arc_service_manager = nullptr; | 26 ArcServiceManager* g_arc_service_manager = nullptr; |
| 26 | 27 |
| 27 } // namespace | 28 } // namespace |
| 28 | 29 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 57 DCHECK(g_arc_service_manager); | 58 DCHECK(g_arc_service_manager); |
| 58 DCHECK(g_arc_service_manager->thread_checker_.CalledOnValidThread()); | 59 DCHECK(g_arc_service_manager->thread_checker_.CalledOnValidThread()); |
| 59 return g_arc_service_manager; | 60 return g_arc_service_manager; |
| 60 } | 61 } |
| 61 | 62 |
| 62 ArcBridgeService* ArcServiceManager::arc_bridge_service() { | 63 ArcBridgeService* ArcServiceManager::arc_bridge_service() { |
| 63 DCHECK(thread_checker_.CalledOnValidThread()); | 64 DCHECK(thread_checker_.CalledOnValidThread()); |
| 64 return arc_bridge_service_.get(); | 65 return arc_bridge_service_.get(); |
| 65 } | 66 } |
| 66 | 67 |
| 68 void ArcServiceManager::OnPrimaryUserProfilePrepared( |
| 69 const AccountId& account_id) { |
| 70 DCHECK(thread_checker_.CalledOnValidThread()); |
| 71 |
| 72 arc_notification_manager_.reset( |
| 73 new ArcNotificationManager(arc_bridge_service(), account_id)); |
| 74 } |
| 75 |
| 67 } // namespace arc | 76 } // namespace arc |
| OLD | NEW |