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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 79 |
80 // Filters out handlers that belong to the intent_helper apk and returns | 80 // Filters out handlers that belong to the intent_helper apk and returns |
81 // a new array. | 81 // a new array. |
82 static std::vector<mojom::IntentHandlerInfoPtr> FilterOutIntentHelper( | 82 static std::vector<mojom::IntentHandlerInfoPtr> FilterOutIntentHelper( |
83 std::vector<mojom::IntentHandlerInfoPtr> handlers); | 83 std::vector<mojom::IntentHandlerInfoPtr> handlers); |
84 | 84 |
85 // Checks if the intent helper interface is available. When it is not, returns | 85 // 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. | 86 // false and updates |out_error_code| if it's not nullptr. |
87 static bool IsIntentHelperAvailable(GetResult* out_error_code); | 87 static bool IsIntentHelperAvailable(GetResult* out_error_code); |
88 | 88 |
| 89 // For supporting ArcServiceManager::GetService<T>(). |
| 90 static const char kArcServiceName[]; |
| 91 |
89 static const char kArcIntentHelperPackageName[]; | 92 static const char kArcIntentHelperPackageName[]; |
90 | 93 |
91 private: | 94 private: |
92 mojo::Binding<mojom::IntentHelperHost> binding_; | 95 mojo::Binding<mojom::IntentHelperHost> binding_; |
93 scoped_refptr<ActivityIconLoader> icon_loader_; | 96 scoped_refptr<ActivityIconLoader> icon_loader_; |
94 scoped_refptr<LocalActivityResolver> activity_resolver_; | 97 scoped_refptr<LocalActivityResolver> activity_resolver_; |
95 | 98 |
96 base::ThreadChecker thread_checker_; | 99 base::ThreadChecker thread_checker_; |
97 | 100 |
98 base::ObserverList<ArcIntentHelperObserver> observer_list_; | 101 base::ObserverList<ArcIntentHelperObserver> observer_list_; |
99 | 102 |
100 DISALLOW_COPY_AND_ASSIGN(ArcIntentHelperBridge); | 103 DISALLOW_COPY_AND_ASSIGN(ArcIntentHelperBridge); |
101 }; | 104 }; |
102 | 105 |
103 } // namespace arc | 106 } // namespace arc |
104 | 107 |
105 #endif // COMPONENTS_ARC_INTENT_HELPER_ARC_INTENT_HELPER_BRIDGE_H_ | 108 #endif // COMPONENTS_ARC_INTENT_HELPER_ARC_INTENT_HELPER_BRIDGE_H_ |
OLD | NEW |