 Chromium Code Reviews
 Chromium Code Reviews Issue 2487623002:
  Notify Files App when ARC++ app is installed/removed  (Closed)
    
  
    Issue 2487623002:
  Notify Files App when ARC++ app is installed/removed  (Closed) 
  | Index: components/arc/intent_helper/arc_intent_helper_bridge.h | 
| diff --git a/components/arc/intent_helper/arc_intent_helper_bridge.h b/components/arc/intent_helper/arc_intent_helper_bridge.h | 
| index c52eb9a809c27627f34814a78ed72ebf171b0e17..cda96022e923a739d432da01890e3368e226d241 100644 | 
| --- a/components/arc/intent_helper/arc_intent_helper_bridge.h | 
| +++ b/components/arc/intent_helper/arc_intent_helper_bridge.h | 
| @@ -11,6 +11,7 @@ | 
| #include "ash/link_handler_model_factory.h" | 
| #include "base/macros.h" | 
| #include "base/memory/ref_counted.h" | 
| +#include "base/observer_list.h" | 
| #include "base/threading/thread_checker.h" | 
| #include "components/arc/arc_service.h" | 
| #include "components/arc/common/intent_helper.mojom.h" | 
| @@ -46,12 +47,21 @@ class ArcIntentHelperBridge | 
| FAILED_ARC_NOT_SUPPORTED, | 
| }; | 
| + class Observer { | 
| + public: | 
| + virtual void OnAppsUpdated() = 0; | 
| 
hidehiko
2016/11/17 07:34:19
Document please.
 
oka
2016/11/21 07:02:15
Done.
 | 
| + }; | 
| 
Yusuke Sato
2016/11/17 02:29:54
Don't we need
 protected:
  virtual ~Observer() {
 
oka
2016/11/21 07:02:15
Done.
 | 
| + | 
| ArcIntentHelperBridge( | 
| ArcBridgeService* bridge_service, | 
| const scoped_refptr<ActivityIconLoader>& icon_loader, | 
| const scoped_refptr<LocalActivityResolver>& activity_resolver); | 
| ~ArcIntentHelperBridge() override; | 
| + static ArcIntentHelperBridge* Get(); | 
| 
hidehiko
2016/11/17 07:34:19
It's better to note this is something workaround,
 
oka
2016/11/21 07:02:15
Done.
 | 
| + | 
| + void AddObserver(Observer* observer); | 
| + | 
| // InstanceHolder<mojom::IntentHelperInstance>::Observer | 
| void OnInstanceReady() override; | 
| void OnInstanceClosed() override; | 
| @@ -97,6 +107,8 @@ class ArcIntentHelperBridge | 
| base::ThreadChecker thread_checker_; | 
| + base::ObserverList<Observer> observer_list_; | 
| + | 
| DISALLOW_COPY_AND_ASSIGN(ArcIntentHelperBridge); | 
| }; |