Chromium Code Reviews| 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) {} | |
|
Luis Héctor Chávez
2017/06/23 15:17:03
other methods invoke their callbacks to avoid the
Jiaquan He
2017/06/23 16:26:27
Done.
| |
| 274 | |
| 270 void FakeAppInstance::LaunchIntent( | 275 void FakeAppInstance::LaunchIntent( |
| 271 const std::string& intent_uri, | 276 const std::string& intent_uri, |
| 272 const base::Optional<gfx::Rect>& dimension_on_screen) { | 277 const base::Optional<gfx::Rect>& dimension_on_screen) { |
| 273 launch_intents_.push_back(intent_uri); | 278 launch_intents_.push_back(intent_uri); |
| 274 } | 279 } |
| 275 | 280 |
| 276 void FakeAppInstance::RequestIcon(const std::string& icon_resource_id, | 281 void FakeAppInstance::RequestIcon(const std::string& icon_resource_id, |
| 277 arc::mojom::ScaleFactor scale_factor, | 282 arc::mojom::ScaleFactor scale_factor, |
| 278 const RequestIconCallback& callback) { | 283 const RequestIconCallback& callback) { |
| 279 shortcut_icon_requests_.push_back( | 284 shortcut_icon_requests_.push_back( |
| 280 base::MakeUnique<ShortcutIconRequest>(icon_resource_id, scale_factor)); | 285 base::MakeUnique<ShortcutIconRequest>(icon_resource_id, scale_factor)); |
| 281 | 286 |
| 282 std::string png_data_as_string; | 287 std::string png_data_as_string; |
| 283 if (GetFakeIcon(scale_factor, &png_data_as_string)) { | 288 if (GetFakeIcon(scale_factor, &png_data_as_string)) { |
| 284 callback.Run(std::vector<uint8_t>(png_data_as_string.begin(), | 289 callback.Run(std::vector<uint8_t>(png_data_as_string.begin(), |
| 285 png_data_as_string.end())); | 290 png_data_as_string.end())); |
| 286 } | 291 } |
| 287 } | 292 } |
| 288 | 293 |
| 289 void FakeAppInstance::RemoveCachedIcon(const std::string& icon_resource_id) {} | 294 void FakeAppInstance::RemoveCachedIcon(const std::string& icon_resource_id) {} |
| 290 | 295 |
| 291 } // namespace arc | 296 } // namespace arc |
| OLD | NEW |