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

Side by Side Diff: components/arc/intent_helper/arc_intent_helper_bridge.h

Issue 2133503002: arc: Revamp the ArcBridgeService interface (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: Fix ui_arc_unittests Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_ARC_INTENT_HELPER_ARC_INTENT_HELPER_BRIDGE_H_ 5 #ifndef COMPONENTS_ARC_INTENT_HELPER_ARC_INTENT_HELPER_BRIDGE_H_
6 #define COMPONENTS_ARC_INTENT_HELPER_ARC_INTENT_HELPER_BRIDGE_H_ 6 #define COMPONENTS_ARC_INTENT_HELPER_ARC_INTENT_HELPER_BRIDGE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 12 matching lines...) Expand all
23 23
24 } // namespace ash 24 } // namespace ash
25 25
26 namespace arc { 26 namespace arc {
27 27
28 class ActivityIconLoader; 28 class ActivityIconLoader;
29 class LocalActivityResolver; 29 class LocalActivityResolver;
30 class SetWallpaperDelegate; 30 class SetWallpaperDelegate;
31 31
32 // Receives intents from ARC. 32 // Receives intents from ARC.
33 class ArcIntentHelperBridge : public ArcService, 33 class ArcIntentHelperBridge
34 public ArcBridgeService::Observer, 34 : public ArcService,
35 public mojom::IntentHelperHost, 35 public ArcBridgeService::InstanceObserver<mojom::IntentHelperInstance>,
36 public ash::LinkHandlerModelFactory { 36 public mojom::IntentHelperHost,
37 public ash::LinkHandlerModelFactory {
37 public: 38 public:
38 ArcIntentHelperBridge( 39 ArcIntentHelperBridge(
39 ArcBridgeService* bridge_service, 40 ArcBridgeService* bridge_service,
40 const scoped_refptr<ActivityIconLoader>& icon_loader, 41 const scoped_refptr<ActivityIconLoader>& icon_loader,
41 std::unique_ptr<SetWallpaperDelegate> set_wallpaper_delegate, 42 std::unique_ptr<SetWallpaperDelegate> set_wallpaper_delegate,
42 const scoped_refptr<LocalActivityResolver>& activity_resolver); 43 const scoped_refptr<LocalActivityResolver>& activity_resolver);
43 ~ArcIntentHelperBridge() override; 44 ~ArcIntentHelperBridge() override;
44 45
45 // ArcBridgeService::Observer 46 // ArcBridgeService::InstanceObserver<mojom::IntentHelperInstance>
46 void OnIntentHelperInstanceReady() override; 47 void OnInstanceReady(mojom::IntentHelperInstance* intent_helper_instance,
47 void OnIntentHelperInstanceClosed() override; 48 uint32_t version) override;
49 void OnInstanceClosed(mojom::IntentHelperInstance*) override;
48 50
49 // arc::mojom::IntentHelperHost 51 // arc::mojom::IntentHelperHost
50 void OnIconInvalidated(const mojo::String& package_name) override; 52 void OnIconInvalidated(const mojo::String& package_name) override;
51 void OnIntentFiltersUpdated( 53 void OnIntentFiltersUpdated(
52 mojo::Array<mojom::IntentFilterPtr> intent_filters) override; 54 mojo::Array<mojom::IntentFilterPtr> intent_filters) override;
53 void OnOpenDownloads() override; 55 void OnOpenDownloads() override;
54 void OnOpenUrl(const mojo::String& url) override; 56 void OnOpenUrl(const mojo::String& url) override;
55 void OpenWallpaperPicker() override; 57 void OpenWallpaperPicker() override;
56 void SetWallpaper(mojo::Array<uint8_t> jpeg_data) override; 58 void SetWallpaper(mojo::Array<uint8_t> jpeg_data) override;
57 59
(...skipping 15 matching lines...) Expand all
73 scoped_refptr<LocalActivityResolver> activity_resolver_; 75 scoped_refptr<LocalActivityResolver> activity_resolver_;
74 76
75 base::ThreadChecker thread_checker_; 77 base::ThreadChecker thread_checker_;
76 78
77 DISALLOW_COPY_AND_ASSIGN(ArcIntentHelperBridge); 79 DISALLOW_COPY_AND_ASSIGN(ArcIntentHelperBridge);
78 }; 80 };
79 81
80 } // namespace arc 82 } // namespace arc
81 83
82 #endif // COMPONENTS_ARC_INTENT_HELPER_ARC_INTENT_HELPER_BRIDGE_H_ 84 #endif // COMPONENTS_ARC_INTENT_HELPER_ARC_INTENT_HELPER_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698