| 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 |
| 270 void FakeAppInstance::LaunchIntent( | 277 void FakeAppInstance::LaunchIntent( |
| 271 const std::string& intent_uri, | 278 const std::string& intent_uri, |
| 272 const base::Optional<gfx::Rect>& dimension_on_screen) { | 279 const base::Optional<gfx::Rect>& dimension_on_screen) { |
| 273 launch_intents_.push_back(intent_uri); | 280 launch_intents_.push_back(intent_uri); |
| 274 } | 281 } |
| 275 | 282 |
| 276 void FakeAppInstance::RequestIcon(const std::string& icon_resource_id, | 283 void FakeAppInstance::RequestIcon(const std::string& icon_resource_id, |
| 277 arc::mojom::ScaleFactor scale_factor, | 284 arc::mojom::ScaleFactor scale_factor, |
| 278 const RequestIconCallback& callback) { | 285 const RequestIconCallback& callback) { |
| 279 shortcut_icon_requests_.push_back( | 286 shortcut_icon_requests_.push_back( |
| 280 base::MakeUnique<ShortcutIconRequest>(icon_resource_id, scale_factor)); | 287 base::MakeUnique<ShortcutIconRequest>(icon_resource_id, scale_factor)); |
| 281 | 288 |
| 282 std::string png_data_as_string; | 289 std::string png_data_as_string; |
| 283 if (GetFakeIcon(scale_factor, &png_data_as_string)) { | 290 if (GetFakeIcon(scale_factor, &png_data_as_string)) { |
| 284 callback.Run(std::vector<uint8_t>(png_data_as_string.begin(), | 291 callback.Run(std::vector<uint8_t>(png_data_as_string.begin(), |
| 285 png_data_as_string.end())); | 292 png_data_as_string.end())); |
| 286 } | 293 } |
| 287 } | 294 } |
| 288 | 295 |
| 289 void FakeAppInstance::RemoveCachedIcon(const std::string& icon_resource_id) {} | 296 void FakeAppInstance::RemoveCachedIcon(const std::string& icon_resource_id) {} |
| 290 | 297 |
| 291 } // namespace arc | 298 } // namespace arc |
| OLD | NEW |