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

Unified Diff: chrome/browser/ui/app_list/arc/arc_app_list_prefs.h

Issue 1523643002: arc-bridge: Move most methods to Mojo interfaces (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: Fixed unit tests Created 5 years 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: chrome/browser/ui/app_list/arc/arc_app_list_prefs.h
diff --git a/chrome/browser/ui/app_list/arc/arc_app_list_prefs.h b/chrome/browser/ui/app_list/arc/arc_app_list_prefs.h
index a8e7bbae9aa1fb30e6577afb1e5de170fde72fa4..1277a852a29586845f36ac4b3d965b8138c81c44 100644
--- a/chrome/browser/ui/app_list/arc/arc_app_list_prefs.h
+++ b/chrome/browser/ui/app_list/arc/arc_app_list_prefs.h
@@ -7,6 +7,7 @@
#include <map>
#include <set>
+#include <string>
#include <vector>
#include "base/files/file_path.h"
@@ -33,8 +34,8 @@ class PrefRegistrySyncable;
// information is used to pre-create non-ready app items while ARC bridge
// service is not ready to provide information about available ARC apps.
class ArcAppListPrefs : public KeyedService,
- public arc::ArcBridgeService::Observer,
- public arc::ArcBridgeService::AppObserver {
+ public arc::AppHost,
+ public arc::ArcBridgeService::Observer {
public:
struct AppInfo {
AppInfo(const std::string& name,
@@ -101,18 +102,21 @@ class ArcAppListPrefs : public KeyedService,
void AddObserver(Observer* observer);
void RemoveObserver(Observer* observer);
- // arc::ArcBridgeService::Observer
- void OnStateChanged(arc::ArcBridgeService::State state) override;
- void OnAppListRefreshed(const std::vector<arc::AppInfo>& apps) override;
- void OnAppIcon(const std::string& package,
- const std::string& activity,
- arc::ScaleFactor scale_factor,
- const std::vector<uint8_t>& icon_png_data) override;
-
private:
// See the Create methods.
ArcAppListPrefs(const base::FilePath& base_path, PrefService* prefs);
+ // arc::ArcBridgeService::Observer:
+ void OnStateChanged(arc::ArcBridgeService::State state) override;
+ void OnAppInstanceReady() override;
+
+ // arc::AppHost:
+ void OnAppListRefreshed(mojo::Array<arc::AppInfoPtr> apps) override;
+ void OnAppIcon(const mojo::String& package,
+ const mojo::String& activity,
+ arc::ScaleFactor scale_factor,
+ mojo::Array<uint8_t> icon_png_data) override;
+
void OnAppReady(const arc::AppInfo& app);
void DisableAllApps();

Powered by Google App Engine
This is Rietveld 408576698