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 IntentFilter; |
33 class LocalActivityResolver; | 34 class LocalActivityResolver; |
34 | 35 |
35 // Receives intents from ARC. | 36 // Receives intents from ARC. |
36 class ArcIntentHelperBridge | 37 class ArcIntentHelperBridge |
37 : public ArcService, | 38 : public ArcService, |
38 public InstanceHolder<mojom::IntentHelperInstance>::Observer, | 39 public InstanceHolder<mojom::IntentHelperInstance>::Observer, |
39 public mojom::IntentHelperHost, | 40 public mojom::IntentHelperHost, |
40 public ash::LinkHandlerModelFactory { | 41 public ash::LinkHandlerModelFactory { |
41 public: | 42 public: |
42 enum class GetResult { | 43 enum class GetResult { |
(...skipping 14 matching lines...) Expand all Loading... |
57 void AddObserver(ArcIntentHelperObserver* observer); | 58 void AddObserver(ArcIntentHelperObserver* observer); |
58 void RemoveObserver(ArcIntentHelperObserver* observer); | 59 void RemoveObserver(ArcIntentHelperObserver* observer); |
59 | 60 |
60 // InstanceHolder<mojom::IntentHelperInstance>::Observer | 61 // InstanceHolder<mojom::IntentHelperInstance>::Observer |
61 void OnInstanceReady() override; | 62 void OnInstanceReady() override; |
62 void OnInstanceClosed() override; | 63 void OnInstanceClosed() override; |
63 | 64 |
64 // mojom::IntentHelperHost | 65 // mojom::IntentHelperHost |
65 void OnIconInvalidated(const std::string& package_name) override; | 66 void OnIconInvalidated(const std::string& package_name) override; |
66 void OnIntentFiltersUpdated( | 67 void OnIntentFiltersUpdated( |
67 std::vector<mojom::IntentFilterPtr> intent_filters) override; | 68 std::vector<IntentFilter> intent_filters) override; |
68 void OnOpenDownloads() override; | 69 void OnOpenDownloads() override; |
69 void OnOpenUrl(const std::string& url) override; | 70 void OnOpenUrl(const std::string& url) override; |
70 void OpenWallpaperPicker() override; | 71 void OpenWallpaperPicker() override; |
71 void SetWallpaperDeprecated(const std::vector<uint8_t>& jpeg_data) override; | 72 void SetWallpaperDeprecated(const std::vector<uint8_t>& jpeg_data) override; |
72 | 73 |
73 // ash::LinkHandlerModelFactory | 74 // ash::LinkHandlerModelFactory |
74 std::unique_ptr<ash::LinkHandlerModel> CreateModel(const GURL& url) override; | 75 std::unique_ptr<ash::LinkHandlerModel> CreateModel(const GURL& url) override; |
75 | 76 |
76 // Returns false if |package_name| is for the intent_helper apk. | 77 // Returns false if |package_name| is for the intent_helper apk. |
77 static bool IsIntentHelperPackage(const std::string& package_name); | 78 static bool IsIntentHelperPackage(const std::string& package_name); |
(...skipping 25 matching lines...) Expand all Loading... |
103 base::ThreadChecker thread_checker_; | 104 base::ThreadChecker thread_checker_; |
104 | 105 |
105 base::ObserverList<ArcIntentHelperObserver> observer_list_; | 106 base::ObserverList<ArcIntentHelperObserver> observer_list_; |
106 | 107 |
107 DISALLOW_COPY_AND_ASSIGN(ArcIntentHelperBridge); | 108 DISALLOW_COPY_AND_ASSIGN(ArcIntentHelperBridge); |
108 }; | 109 }; |
109 | 110 |
110 } // namespace arc | 111 } // namespace arc |
111 | 112 |
112 #endif // COMPONENTS_ARC_INTENT_HELPER_ARC_INTENT_HELPER_BRIDGE_H_ | 113 #endif // COMPONENTS_ARC_INTENT_HELPER_ARC_INTENT_HELPER_BRIDGE_H_ |
OLD | NEW |