Chromium Code Reviews| 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 #ifndef COMPONENTS_ARC_ARC_SERVICE_MANAGER_H_ | 5 #ifndef COMPONENTS_ARC_ARC_SERVICE_MANAGER_H_ |
| 6 #define COMPONENTS_ARC_ARC_SERVICE_MANAGER_H_ | 6 #define COMPONENTS_ARC_ARC_SERVICE_MANAGER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/threading/thread_checker.h" | 10 #include "base/threading/thread_checker.h" |
| 11 #include "components/signin/core/account_id/account_id.h" | |
| 11 | 12 |
| 12 namespace arc { | 13 namespace arc { |
| 13 | 14 |
| 14 class ArcBridgeService; | 15 class ArcBridgeService; |
| 15 class ArcInputBridge; | 16 class ArcInputBridge; |
| 17 class ArcNotificationManager; | |
| 16 | 18 |
| 17 // Manages creation and destruction of services that communicate with the ARC | 19 // Manages creation and destruction of services that communicate with the ARC |
| 18 // instance via the ArcBridgeService. | 20 // instance via the ArcBridgeService. |
| 19 class ArcServiceManager { | 21 class ArcServiceManager { |
| 20 public: | 22 public: |
| 21 ArcServiceManager(); | 23 ArcServiceManager(); |
| 22 virtual ~ArcServiceManager(); | 24 virtual ~ArcServiceManager(); |
| 23 | 25 |
| 24 // |arc_bridge_service| can only be accessed on the thread that this | 26 // |arc_bridge_service| can only be accessed on the thread that this |
| 25 // class was created on. | 27 // class was created on. |
| 26 ArcBridgeService* arc_bridge_service(); | 28 ArcBridgeService* arc_bridge_service(); |
| 27 | 29 |
| 28 // Gets the global instance of the ARC Service Manager. This can only be | 30 // Gets the global instance of the ARC Service Manager. This can only be |
| 29 // called on the thread that this class was created on. | 31 // called on the thread that this class was created on. |
| 30 static ArcServiceManager* Get(); | 32 static ArcServiceManager* Get(); |
| 31 | 33 |
| 34 void PostProfileInit(const AccountId& account_id); | |
|
hidehiko
2015/12/17 07:47:51
Could you add comments, specifically when this wil
yoshiki
2015/12/17 19:15:13
Done.
| |
| 35 | |
| 32 private: | 36 private: |
| 33 base::ThreadChecker thread_checker_; | 37 base::ThreadChecker thread_checker_; |
| 34 scoped_ptr<ArcBridgeService> arc_bridge_service_; | 38 scoped_ptr<ArcBridgeService> arc_bridge_service_; |
| 35 scoped_ptr<ArcInputBridge> arc_input_bridge_; | 39 scoped_ptr<ArcInputBridge> arc_input_bridge_; |
| 40 scoped_ptr<ArcNotificationManager> arc_notification_manager_; | |
| 36 | 41 |
| 37 DISALLOW_COPY_AND_ASSIGN(ArcServiceManager); | 42 DISALLOW_COPY_AND_ASSIGN(ArcServiceManager); |
| 38 }; | 43 }; |
| 39 | 44 |
| 40 } // namespace arc | 45 } // namespace arc |
| 41 | 46 |
| 42 #endif // COMPONENTS_ARC_ARC_SERVICE_MANAGER_H_ | 47 #endif // COMPONENTS_ARC_ARC_SERVICE_MANAGER_H_ |
| OLD | NEW |