OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #include "components/arc/test/fake_app_instance.h" | 5 #include "components/arc/test/fake_app_instance.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 mojom::ShowPackageInfoPage page, | 260 mojom::ShowPackageInfoPage page, |
261 const gfx::Rect& dimension_on_screen) {} | 261 const gfx::Rect& dimension_on_screen) {} |
262 | 262 |
263 void FakeAppInstance::SetNotificationsEnabled(const std::string& package_name, | 263 void FakeAppInstance::SetNotificationsEnabled(const std::string& package_name, |
264 bool enabled) {} | 264 bool enabled) {} |
265 | 265 |
266 void FakeAppInstance::InstallPackage(mojom::ArcPackageInfoPtr arcPackageInfo) { | 266 void FakeAppInstance::InstallPackage(mojom::ArcPackageInfoPtr arcPackageInfo) { |
267 app_host_->OnPackageAdded(std::move(arcPackageInfo)); | 267 app_host_->OnPackageAdded(std::move(arcPackageInfo)); |
268 } | 268 } |
269 | 269 |
270 void FakeAppInstance::GetRecentAndSuggestedAppsFromPlayStore( | |
271 const std::string& query, | |
272 int32_t max_results, | |
273 const GetRecentAndSuggestedAppsFromPlayStoreCallback& callback) { | |
274 callback.Run(std::vector<arc::mojom::AppDiscoveryResultPtr>()); | |
275 } | |
276 | |
277 void FakeAppInstance::LaunchIntent( | 270 void FakeAppInstance::LaunchIntent( |
278 const std::string& intent_uri, | 271 const std::string& intent_uri, |
279 const base::Optional<gfx::Rect>& dimension_on_screen) { | 272 const base::Optional<gfx::Rect>& dimension_on_screen) { |
280 launch_intents_.push_back(intent_uri); | 273 launch_intents_.push_back(intent_uri); |
281 } | 274 } |
282 | 275 |
283 void FakeAppInstance::RequestIcon(const std::string& icon_resource_id, | 276 void FakeAppInstance::RequestIcon(const std::string& icon_resource_id, |
284 arc::mojom::ScaleFactor scale_factor, | 277 arc::mojom::ScaleFactor scale_factor, |
285 const RequestIconCallback& callback) { | 278 const RequestIconCallback& callback) { |
286 shortcut_icon_requests_.push_back( | 279 shortcut_icon_requests_.push_back( |
287 base::MakeUnique<ShortcutIconRequest>(icon_resource_id, scale_factor)); | 280 base::MakeUnique<ShortcutIconRequest>(icon_resource_id, scale_factor)); |
288 | 281 |
289 std::string png_data_as_string; | 282 std::string png_data_as_string; |
290 if (GetFakeIcon(scale_factor, &png_data_as_string)) { | 283 if (GetFakeIcon(scale_factor, &png_data_as_string)) { |
291 callback.Run(std::vector<uint8_t>(png_data_as_string.begin(), | 284 callback.Run(std::vector<uint8_t>(png_data_as_string.begin(), |
292 png_data_as_string.end())); | 285 png_data_as_string.end())); |
293 } | 286 } |
294 } | 287 } |
295 | 288 |
296 void FakeAppInstance::RemoveCachedIcon(const std::string& icon_resource_id) {} | 289 void FakeAppInstance::RemoveCachedIcon(const std::string& icon_resource_id) {} |
297 | 290 |
298 } // namespace arc | 291 } // namespace arc |
OLD | NEW |