Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Side by Side Diff: components/arc/test/fake_app_instance.cc

Issue 2257923002: arc: Handle non-launchable apps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/arc/test/fake_app_instance.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 const std::vector<mojom::ShortcutInfo>& shortcuts) { 67 const std::vector<mojom::ShortcutInfo>& shortcuts) {
68 for (auto& shortcut : shortcuts) { 68 for (auto& shortcut : shortcuts) {
69 app_host_->OnInstallShortcut(shortcut.Clone()); 69 app_host_->OnInstallShortcut(shortcut.Clone());
70 } 70 }
71 } 71 }
72 72
73 void FakeAppInstance::SendInstallShortcut(const mojom::ShortcutInfo& shortcut) { 73 void FakeAppInstance::SendInstallShortcut(const mojom::ShortcutInfo& shortcut) {
74 app_host_->OnInstallShortcut(shortcut.Clone()); 74 app_host_->OnInstallShortcut(shortcut.Clone());
75 } 75 }
76 76
77 void FakeAppInstance::SendAppAdded(const mojom::AppInfo& app) {
78 app_host_->OnAppAdded(mojom::AppInfo::From(app));
79 }
80
77 void FakeAppInstance::SendTaskCreated(int32_t taskId, 81 void FakeAppInstance::SendTaskCreated(int32_t taskId,
78 const mojom::AppInfo& app) { 82 const mojom::AppInfo& app) {
79 app_host_->OnTaskCreated(taskId, app.package_name, app.activity); 83 app_host_->OnTaskCreated(taskId, app.package_name, app.activity, app.name);
80 } 84 }
81 85
82 void FakeAppInstance::SendTaskDestroyed(int32_t taskId) { 86 void FakeAppInstance::SendTaskDestroyed(int32_t taskId) {
83 app_host_->OnTaskDestroyed(taskId); 87 app_host_->OnTaskDestroyed(taskId);
84 } 88 }
85 89
86 bool FakeAppInstance::GenerateAndSendIcon(const mojom::AppInfo& app, 90 bool FakeAppInstance::GenerateAndSendIcon(const mojom::AppInfo& app,
87 mojom::ScaleFactor scale_factor, 91 mojom::ScaleFactor scale_factor,
88 std::string* png_data_as_string) { 92 std::string* png_data_as_string) {
89 if (!GetFakeIcon(scale_factor, png_data_as_string)) { 93 if (!GetFakeIcon(scale_factor, png_data_as_string)) {
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 246
243 std::string png_data_as_string; 247 std::string png_data_as_string;
244 if (GetFakeIcon(scale_factor, &png_data_as_string)) { 248 if (GetFakeIcon(scale_factor, &png_data_as_string)) {
245 callback.Run(mojo::Array<uint8_t>::From(png_data_as_string)); 249 callback.Run(mojo::Array<uint8_t>::From(png_data_as_string));
246 } 250 }
247 } 251 }
248 252
249 void FakeAppInstance::RemoveCachedIcon(const mojo::String& icon_resource_id) {} 253 void FakeAppInstance::RemoveCachedIcon(const mojo::String& icon_resource_id) {}
250 254
251 } // namespace arc 255 } // namespace arc
OLDNEW
« no previous file with comments | « components/arc/test/fake_app_instance.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698