| 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..dac64473790fdafb6a4ff622c7f991ff562d4711 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"
|
| @@ -16,6 +17,7 @@
|
| #include "base/observer_list.h"
|
| #include "components/arc/arc_bridge_service.h"
|
| #include "components/keyed_service/core/keyed_service.h"
|
| +#include "mojo/public/cpp/bindings/binding.h"
|
| #include "ui/base/layout.h"
|
|
|
| class PrefService;
|
| @@ -33,8 +35,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 +103,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();
|
|
|
| @@ -140,6 +145,8 @@ class ArcAppListPrefs : public KeyedService,
|
| // position.
|
| std::map<std::string, uint32> request_icon_deferred_;
|
|
|
| + mojo::Binding<arc::AppHost> binding_;
|
| +
|
| base::WeakPtrFactory<ArcAppListPrefs> weak_ptr_factory_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ArcAppListPrefs);
|
|
|