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 #ifndef COMPONENTS_ARC_INTENT_HELPER_ARC_INTENT_HELPER_BRIDGE_H_ | 5 #ifndef COMPONENTS_ARC_INTENT_HELPER_ARC_INTENT_HELPER_BRIDGE_H_ |
6 #define COMPONENTS_ARC_INTENT_HELPER_ARC_INTENT_HELPER_BRIDGE_H_ | 6 #define COMPONENTS_ARC_INTENT_HELPER_ARC_INTENT_HELPER_BRIDGE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 12 matching lines...) Expand all Loading... | |
23 namespace ash { | 23 namespace ash { |
24 | 24 |
25 class LinkHandlerModel; | 25 class LinkHandlerModel; |
26 | 26 |
27 } // namespace ash | 27 } // namespace ash |
28 | 28 |
29 namespace arc { | 29 namespace arc { |
30 | 30 |
31 class ActivityIconLoader; | 31 class ActivityIconLoader; |
32 class ArcBridgeService; | 32 class ArcBridgeService; |
33 class ArcServiceManager; | |
33 class IntentFilter; | 34 class IntentFilter; |
34 class LocalActivityResolver; | 35 class LocalActivityResolver; |
35 | 36 |
36 // Receives intents from ARC. | 37 // Receives intents from ARC. |
37 class ArcIntentHelperBridge | 38 class ArcIntentHelperBridge |
38 : public ArcService, | 39 : public ArcService, |
39 public InstanceHolder<mojom::IntentHelperInstance>::Observer, | 40 public InstanceHolder<mojom::IntentHelperInstance>::Observer, |
40 public mojom::IntentHelperHost, | 41 public mojom::IntentHelperHost, |
41 public ash::LinkHandlerModelFactory { | 42 public ash::LinkHandlerModelFactory { |
42 public: | 43 public: |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
79 | 80 |
80 // Filters out handlers that belong to the intent_helper apk and returns | 81 // Filters out handlers that belong to the intent_helper apk and returns |
81 // a new array. | 82 // a new array. |
82 static std::vector<mojom::IntentHandlerInfoPtr> FilterOutIntentHelper( | 83 static std::vector<mojom::IntentHandlerInfoPtr> FilterOutIntentHelper( |
83 std::vector<mojom::IntentHandlerInfoPtr> handlers); | 84 std::vector<mojom::IntentHandlerInfoPtr> handlers); |
84 | 85 |
85 // Checks if the intent helper interface is available. When it is not, returns | 86 // Checks if the intent helper interface is available. When it is not, returns |
86 // false and updates |out_error_code| if it's not nullptr. | 87 // false and updates |out_error_code| if it's not nullptr. |
87 static bool IsIntentHelperAvailable(GetResult* out_error_code); | 88 static bool IsIntentHelperAvailable(GetResult* out_error_code); |
88 | 89 |
90 // Gets an ArcIntentHelperBridge instance in |service_manager|. Returns | |
Luis Héctor Chávez
2017/01/12 00:21:13
nit: Gets the ArcIntentHelperBridge...
Yusuke Sato
2017/01/12 00:30:56
Done (PS#4 doesn't have the function)
| |
91 // nullptr if none found. | |
92 static ArcIntentHelperBridge* Get(ArcServiceManager* service_manager); | |
93 | |
94 // For supporting ArcServiceManager::GetService<T>(). | |
95 static const char kArcServiceName[]; | |
96 | |
89 static const char kArcIntentHelperPackageName[]; | 97 static const char kArcIntentHelperPackageName[]; |
90 | 98 |
91 private: | 99 private: |
92 mojo::Binding<mojom::IntentHelperHost> binding_; | 100 mojo::Binding<mojom::IntentHelperHost> binding_; |
93 scoped_refptr<ActivityIconLoader> icon_loader_; | 101 scoped_refptr<ActivityIconLoader> icon_loader_; |
94 scoped_refptr<LocalActivityResolver> activity_resolver_; | 102 scoped_refptr<LocalActivityResolver> activity_resolver_; |
95 | 103 |
96 base::ThreadChecker thread_checker_; | 104 base::ThreadChecker thread_checker_; |
97 | 105 |
98 base::ObserverList<ArcIntentHelperObserver> observer_list_; | 106 base::ObserverList<ArcIntentHelperObserver> observer_list_; |
99 | 107 |
100 DISALLOW_COPY_AND_ASSIGN(ArcIntentHelperBridge); | 108 DISALLOW_COPY_AND_ASSIGN(ArcIntentHelperBridge); |
101 }; | 109 }; |
102 | 110 |
103 } // namespace arc | 111 } // namespace arc |
104 | 112 |
105 #endif // COMPONENTS_ARC_INTENT_HELPER_ARC_INTENT_HELPER_BRIDGE_H_ | 113 #endif // COMPONENTS_ARC_INTENT_HELPER_ARC_INTENT_HELPER_BRIDGE_H_ |
OLD | NEW |