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

Unified Diff: components/arc/arc_bridge_service_impl.h

Issue 1475563002: arc-bridge: Implement IPC message for app launcher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move spliting arc_bridge_service to another CL Created 5 years, 1 month 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
Index: components/arc/arc_bridge_service_impl.h
diff --git a/components/arc/arc_bridge_service_impl.h b/components/arc/arc_bridge_service_impl.h
index aa7add0f0b428241eba5673779e12f2d67979ed4..2c113a568d809fe32c9e78979b4bb44d57e183d0 100644
--- a/components/arc/arc_bridge_service_impl.h
+++ b/components/arc/arc_bridge_service_impl.h
@@ -23,6 +23,7 @@ namespace arc {
class ArcBridgeServiceImpl : public ArcBridgeService,
public IPC::Listener {
public:
+
ArcBridgeServiceImpl(
const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner,
const scoped_refptr<base::SequencedTaskRunner>& file_task_runner);
@@ -38,6 +39,18 @@ class ArcBridgeServiceImpl : public ArcBridgeService,
const std::string& device_type,
base::ScopedFD fd) override;
+ // Requests to refresh an app list.
+ bool RefreshApps() override;
+
+ // Requests to launch an app.
+ bool LaunchApp(const std::string& package,
+ const std::string& activity) override;
+
+ // Request to load icon of specific scale_factor.
+ bool RequestIcon(const std::string& package,
+ const std::string& activity,
+ int scale_factor) override;
+
private:
friend class ArcBridgeTest;
FRIEND_TEST_ALL_PREFIXES(ArcBridgeTest, Basic);
@@ -70,6 +83,15 @@ class ArcBridgeServiceImpl : public ArcBridgeService,
// Called when the instance has reached a boot phase
void OnInstanceBootPhase(InstanceBootPhase phase);
+ // Called whenever ARC sends information about available apps.
+ void OnAppsRefreshed(const std::vector<arc::AppInfo>& apps);
+
+ // Called whenever ARC sends app icon data for specific scale factor.
+ void OnAppIcon(const std::string& package,
+ const std::string& activity,
+ int scale_factor,
+ const std::vector<uint8_t>& icon_png_data);
+
// IPC::Listener:
bool OnMessageReceived(const IPC::Message& message) override;

Powered by Google App Engine
This is Rietveld 408576698