OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 CHROME_BROWSER_CHROMEOS_ARC_ARC_SETTINGS_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_SETTINGS_SERVICE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_SETTINGS_SERVICE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_SETTINGS_SERVICE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "components/arc/arc_bridge_service.h" | 11 #include "components/arc/arc_bridge_service.h" |
12 #include "components/arc/arc_service.h" | 12 #include "components/arc/arc_service.h" |
| 13 #include "components/arc/instance_holder.h" |
13 | 14 |
14 namespace arc { | 15 namespace arc { |
15 | 16 |
16 class ArcSettingsServiceImpl; | 17 class ArcSettingsServiceImpl; |
17 | 18 |
18 class ArcSettingsService : public ArcService, | 19 class ArcSettingsService |
19 public ArcBridgeService::Observer { | 20 : public ArcService, |
| 21 public InstanceHolder<mojom::IntentHelperInstance>::Observer { |
20 public: | 22 public: |
21 explicit ArcSettingsService(ArcBridgeService* bridge_service); | 23 explicit ArcSettingsService(ArcBridgeService* bridge_service); |
22 ~ArcSettingsService() override; | 24 ~ArcSettingsService() override; |
23 | 25 |
24 // ArcBridgeService::Observer | 26 // InstanceHolder<mojom::IntentHelperInstance>::Observer |
25 void OnIntentHelperInstanceReady() override; | 27 void OnInstanceReady() override; |
26 void OnIntentHelperInstanceClosed() override; | 28 void OnInstanceClosed() override; |
27 | 29 |
28 private: | 30 private: |
29 std::unique_ptr<ArcSettingsServiceImpl> impl_; | 31 std::unique_ptr<ArcSettingsServiceImpl> impl_; |
30 | 32 |
31 DISALLOW_COPY_AND_ASSIGN(ArcSettingsService); | 33 DISALLOW_COPY_AND_ASSIGN(ArcSettingsService); |
32 }; | 34 }; |
33 | 35 |
34 } // namespace arc | 36 } // namespace arc |
35 | 37 |
36 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_SETTINGS_SERVICE_H_ | 38 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_SETTINGS_SERVICE_H_ |
OLD | NEW |