| 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 <vector> | 10 #include <vector> |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 mojom::ScaleFactor scale_factor) { | 56 mojom::ScaleFactor scale_factor) { |
| 57 icon_requests_.push_back( | 57 icon_requests_.push_back( |
| 58 new IconRequest(package_name, activity, scale_factor)); | 58 new IconRequest(package_name, activity, scale_factor)); |
| 59 } | 59 } |
| 60 | 60 |
| 61 void FakeAppInstance::SendRefreshAppList( | 61 void FakeAppInstance::SendRefreshAppList( |
| 62 const std::vector<mojom::AppInfo>& apps) { | 62 const std::vector<mojom::AppInfo>& apps) { |
| 63 app_host_->OnAppListRefreshed(mojo::Array<mojom::AppInfoPtr>::From(apps)); | 63 app_host_->OnAppListRefreshed(mojo::Array<mojom::AppInfoPtr>::From(apps)); |
| 64 } | 64 } |
| 65 | 65 |
| 66 void FakeAppInstance::SendPackageAppListRefreshed( |
| 67 const mojo::String& package_name, |
| 68 const std::vector<mojom::AppInfo>& apps) { |
| 69 app_host_->OnPackageAppListRefreshed( |
| 70 package_name, |
| 71 mojo::Array<mojom::AppInfoPtr>::From(apps)); |
| 72 } |
| 73 |
| 66 void FakeAppInstance::SendInstallShortcuts( | 74 void FakeAppInstance::SendInstallShortcuts( |
| 67 const std::vector<mojom::ShortcutInfo>& shortcuts) { | 75 const std::vector<mojom::ShortcutInfo>& shortcuts) { |
| 68 for (auto& shortcut : shortcuts) { | 76 for (auto& shortcut : shortcuts) { |
| 69 app_host_->OnInstallShortcut(shortcut.Clone()); | 77 app_host_->OnInstallShortcut(shortcut.Clone()); |
| 70 } | 78 } |
| 71 } | 79 } |
| 72 | 80 |
| 73 void FakeAppInstance::SendInstallShortcut(const mojom::ShortcutInfo& shortcut) { | 81 void FakeAppInstance::SendInstallShortcut(const mojom::ShortcutInfo& shortcut) { |
| 74 app_host_->OnInstallShortcut(shortcut.Clone()); | 82 app_host_->OnInstallShortcut(shortcut.Clone()); |
| 75 } | 83 } |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 | 232 |
| 225 std::string png_data_as_string; | 233 std::string png_data_as_string; |
| 226 if (GetFakeIcon(scale_factor, &png_data_as_string)) { | 234 if (GetFakeIcon(scale_factor, &png_data_as_string)) { |
| 227 callback.Run(mojo::Array<uint8_t>::From(png_data_as_string)); | 235 callback.Run(mojo::Array<uint8_t>::From(png_data_as_string)); |
| 228 } | 236 } |
| 229 } | 237 } |
| 230 | 238 |
| 231 void FakeAppInstance::RemoveCachedIcon(const mojo::String& icon_resource_id) {} | 239 void FakeAppInstance::RemoveCachedIcon(const mojo::String& icon_resource_id) {} |
| 232 | 240 |
| 233 } // namespace arc | 241 } // namespace arc |
| OLD | NEW |