| Index: components/arc/arc_service_manager.h
|
| diff --git a/components/arc/arc_service_manager.h b/components/arc/arc_service_manager.h
|
| index 57a00cce6fcb3214358c9a269bc2097714580a1c..dac67e90d86e52aec755bbf31084e1f9e716c57b 100644
|
| --- a/components/arc/arc_service_manager.h
|
| +++ b/components/arc/arc_service_manager.h
|
| @@ -10,9 +10,11 @@
|
|
|
| #include "base/macros.h"
|
| #include "base/memory/ref_counted.h"
|
| +#include "base/observer_list.h"
|
| #include "base/task_runner.h"
|
| #include "base/threading/thread_checker.h"
|
| #include "components/arc/intent_helper/activity_icon_loader.h"
|
| +#include "components/arc/intent_helper/arc_intent_helper_observer.h"
|
| #include "components/arc/intent_helper/local_activity_resolver.h"
|
|
|
| namespace arc {
|
| @@ -22,11 +24,20 @@ class ArcService;
|
|
|
| // Manages creation and destruction of services that communicate with the ARC
|
| // instance via the ArcBridgeService.
|
| -class ArcServiceManager {
|
| +class ArcServiceManager : public arc::ArcIntentHelperObserver {
|
| public:
|
| + class Observer {
|
| + public:
|
| + // Called when app's intent filter is updated.
|
| + virtual void OnAppsUpdated() = 0;
|
| +
|
| + protected:
|
| + virtual ~Observer() = default;
|
| + };
|
| +
|
| explicit ArcServiceManager(
|
| scoped_refptr<base::TaskRunner> blocking_task_runner);
|
| - virtual ~ArcServiceManager();
|
| + ~ArcServiceManager() override;
|
|
|
| // |arc_bridge_service| can only be accessed on the thread that this
|
| // class was created on.
|
| @@ -39,6 +50,15 @@ class ArcServiceManager {
|
| // called on the thread that this class was created on.
|
| static ArcServiceManager* Get();
|
|
|
| + // Returns if the ARC Service Manager instance exists.
|
| + static bool IsInitialized();
|
| +
|
| + void AddObserver(Observer* observer);
|
| + void RemoveObserver(Observer* observer);
|
| +
|
| + // arc::ArcIntentHelperObserver overrides.
|
| + void OnAppsUpdated() override;
|
| +
|
| // Called to shut down all ARC services.
|
| void Shutdown();
|
|
|
| @@ -68,6 +88,8 @@ class ArcServiceManager {
|
| scoped_refptr<ActivityIconLoader> icon_loader_;
|
| scoped_refptr<LocalActivityResolver> activity_resolver_;
|
|
|
| + base::ObserverList<Observer> observer_list_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(ArcServiceManager);
|
| };
|
|
|
|
|