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

Unified Diff: components/arc/test/fake_app_instance.h

Issue 1823923002: arc: Support running Arc app in shelf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased + few nits Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/arc/common/app.mojom ('k') | components/arc/test/fake_app_instance.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/test/fake_app_instance.h
diff --git a/components/arc/test/fake_app_instance.h b/components/arc/test/fake_app_instance.h
index 9acddf1c53275d1fd013aad4453b9ec678a668a2..b45f929fbe64642ddface1efb431f78f6c15641b 100644
--- a/components/arc/test/fake_app_instance.h
+++ b/components/arc/test/fake_app_instance.h
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_ARC_TEST_FAKE_APP_INSTANCE_H_
#define COMPONENTS_ARC_TEST_FAKE_APP_INSTANCE_H_
+#include <map>
#include <string>
#include <vector>
@@ -77,12 +78,17 @@ class FakeAppInstance : public AppInstance {
ScreenRectPtr dimension,
const CanHandleResolutionCallback& callback) override;
void UninstallPackage(const mojo::String& package_name) override;
+ void GetTaskInfo(int32_t task_id,
+ const GetTaskInfoCallback& callback) override;
// Methods to reply messages.
void SendRefreshAppList(const std::vector<AppInfo>& apps);
bool GenerateAndSendIcon(const AppInfo& app,
ScaleFactor scale_factor,
std::string* png_data_as_string);
+ void SetTaskInfo(int32_t task_id,
+ const std::string& package_name,
+ const std::string& activity);
int refresh_app_list_count() const { return refresh_app_list_count_; }
@@ -106,6 +112,7 @@ class FakeAppInstance : public AppInstance {
void WaitForOnAppInstanceReady();
private:
+ using TaskIdToInfo = std::map<int32_t, scoped_ptr<Request>>;
// Mojo endpoints.
mojo::Binding<AppInstance> binding_;
AppHost* app_host_;
@@ -115,6 +122,10 @@ class FakeAppInstance : public AppInstance {
ScopedVector<Request> launch_requests_;
// Keeps information about icon load requests.
ScopedVector<IconRequest> icon_requests_;
+ // Keeps information for running tasks.
+ TaskIdToInfo task_id_to_info_;
+
+ DISALLOW_COPY_AND_ASSIGN(FakeAppInstance);
};
} // namespace arc
« no previous file with comments | « components/arc/common/app.mojom ('k') | components/arc/test/fake_app_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698