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 #include "components/arc/intent_helper/arc_intent_helper_bridge.h" | 5 #include "components/arc/intent_helper/arc_intent_helper_bridge.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/common/new_window_delegate.h" | 10 #include "ash/common/new_window_delegate.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 return std::move(impl); | 99 return std::move(impl); |
100 } | 100 } |
101 | 101 |
102 // static | 102 // static |
103 bool ArcIntentHelperBridge::IsIntentHelperPackage( | 103 bool ArcIntentHelperBridge::IsIntentHelperPackage( |
104 const std::string& package_name) { | 104 const std::string& package_name) { |
105 return package_name == kArcIntentHelperPackageName; | 105 return package_name == kArcIntentHelperPackageName; |
106 } | 106 } |
107 | 107 |
108 // static | 108 // static |
109 mojo::Array<mojom::UrlHandlerInfoPtr> | 109 mojo::Array<mojom::IntentHandlerInfoPtr> |
110 ArcIntentHelperBridge::FilterOutIntentHelper( | 110 ArcIntentHelperBridge::FilterOutIntentHelper( |
111 mojo::Array<mojom::UrlHandlerInfoPtr> handlers) { | 111 mojo::Array<mojom::IntentHandlerInfoPtr> handlers) { |
112 mojo::Array<mojom::UrlHandlerInfoPtr> handlers_filtered; | 112 mojo::Array<mojom::IntentHandlerInfoPtr> handlers_filtered; |
113 for (auto& handler : handlers) { | 113 for (auto& handler : handlers) { |
114 if (IsIntentHelperPackage(handler->package_name.get())) | 114 if (IsIntentHelperPackage(handler->package_name.get())) |
115 continue; | 115 continue; |
116 handlers_filtered.push_back(std::move(handler)); | 116 handlers_filtered.push_back(std::move(handler)); |
117 } | 117 } |
118 return handlers_filtered; | 118 return handlers_filtered; |
119 } | 119 } |
120 | 120 |
121 // static | 121 // static |
122 mojom::IntentHelperInstance* | 122 mojom::IntentHelperInstance* |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 return GetIntentHelperInstanceWithErrorCode(min_instance_version, nullptr); | 161 return GetIntentHelperInstanceWithErrorCode(min_instance_version, nullptr); |
162 } | 162 } |
163 | 163 |
164 void ArcIntentHelperBridge::OnIntentFiltersUpdated( | 164 void ArcIntentHelperBridge::OnIntentFiltersUpdated( |
165 mojo::Array<mojom::IntentFilterPtr> filters) { | 165 mojo::Array<mojom::IntentFilterPtr> filters) { |
166 DCHECK(thread_checker_.CalledOnValidThread()); | 166 DCHECK(thread_checker_.CalledOnValidThread()); |
167 activity_resolver_->UpdateIntentFilters(std::move(filters)); | 167 activity_resolver_->UpdateIntentFilters(std::move(filters)); |
168 } | 168 } |
169 | 169 |
170 } // namespace arc | 170 } // namespace arc |
OLD | NEW |