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

Unified Diff: chromeos/dbus/arc_bridge_client.h

Issue 1413153007: arc-app-launcher: Minimal support for ARC app launcher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
Index: chromeos/dbus/arc_bridge_client.h
diff --git a/chromeos/dbus/arc_bridge_client.h b/chromeos/dbus/arc_bridge_client.h
index 11d568dd359ff47fffdbce8f4181d787de5adfc4..b289485beb1bc78d8ede0888c939bcfa9b225acb 100644
--- a/chromeos/dbus/arc_bridge_client.h
+++ b/chromeos/dbus/arc_bridge_client.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROMEOS_ARC_BRIDGE_CLIENT_H_
-#define CHROMEOS_ARC_BRIDGE_CLIENT_H_
+#ifndef CHROMEOS_DBUS_ARC_BRIDGE_CLIENT_H_
+#define CHROMEOS_DBUS_ARC_BRIDGE_CLIENT_H_
#include "base/basictypes.h"
#include "chromeos/chromeos_export.h"
@@ -19,6 +19,26 @@ namespace chromeos {
// Client for the Arc Bridge Service
class CHROMEOS_EXPORT ArcBridgeClient : public DBusClient {
public:
+ struct AppInfo {
+ AppInfo();
+ ~AppInfo();
+
+ std::string name;
+ std::string description;
+ std::string package;
+ std::string activity;
+ std::vector<uint8> icon;
+ };
+
+ class AppObserver {
+ public:
+ virtual void OnAppReady(const AppInfo& app) = 0;
+ virtual void OnAppsRefreshed(const std::vector<AppInfo>& apps) = 0;
+
+ protected:
+ virtual ~AppObserver() {}
+ };
+
~ArcBridgeClient() override;
// Factory function, creates a new instance and returns ownership.
@@ -28,6 +48,18 @@ class CHROMEOS_EXPORT ArcBridgeClient : public DBusClient {
// Calls Ping method. |callback| is called after the method call succeeds.
virtual void Ping(const VoidDBusMethodCallback& callback) = 0;
+ // Refreshs app list.
+ virtual void Refresh() = 0;
+
+ // Launchs the given app.
+ virtual void LaunchApp(const std::string& package,
+ const std::string& activity) = 0;
+
+ // Adds the given observer.
+ virtual void AddAppObserver(AppObserver* observer) = 0;
+ // Removes the given observer if this object has the observer.
+ virtual void RemoveAppObserver(AppObserver* observer) = 0;
+
protected:
// Create() should be used instead.
ArcBridgeClient();
@@ -38,4 +70,4 @@ class CHROMEOS_EXPORT ArcBridgeClient : public DBusClient {
} // namespace chromeos
-#endif // CHROMEOS_ARC_BRIDGE_CLIENT_H_
+#endif // CHROMEOS_DBUS_ARC_BRIDGE_CLIENT_H_

Powered by Google App Engine
This is Rietveld 408576698