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

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: More rebasing 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
11 #include "ash/link_handler_model_factory.h" 11 #include "ash/link_handler_model_factory.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/threading/thread_checker.h" 14 #include "base/threading/thread_checker.h"
15 #include "components/arc/arc_bridge_service.h" 15 #include "components/arc/arc_bridge_service.h"
16 #include "components/arc/arc_service.h" 16 #include "components/arc/arc_service.h"
17 #include "components/arc/common/intent_helper.mojom.h" 17 #include "components/arc/common/intent_helper.mojom.h"
18 #include "components/arc/instance_holder.h"
18 #include "mojo/public/cpp/bindings/binding.h" 19 #include "mojo/public/cpp/bindings/binding.h"
19 20
20 namespace ash { 21 namespace ash {
21 22
22 class LinkHandlerModel; 23 class LinkHandlerModel;
23 24
24 } // namespace ash 25 } // namespace ash
25 26
26 namespace arc { 27 namespace arc {
27 28
28 class ActivityIconLoader; 29 class ActivityIconLoader;
29 class LocalActivityResolver; 30 class LocalActivityResolver;
30 class SetWallpaperDelegate; 31 class SetWallpaperDelegate;
31 32
32 // Receives intents from ARC. 33 // Receives intents from ARC.
33 class ArcIntentHelperBridge : public ArcService, 34 class ArcIntentHelperBridge
34 public ArcBridgeService::Observer, 35 : public ArcService,
35 public mojom::IntentHelperHost, 36 public InstanceHolder<mojom::IntentHelperInstance>::Observer,
36 public ash::LinkHandlerModelFactory { 37 public mojom::IntentHelperHost,
38 public ash::LinkHandlerModelFactory {
37 public: 39 public:
38 ArcIntentHelperBridge( 40 ArcIntentHelperBridge(
39 ArcBridgeService* bridge_service, 41 ArcBridgeService* bridge_service,
40 const scoped_refptr<ActivityIconLoader>& icon_loader, 42 const scoped_refptr<ActivityIconLoader>& icon_loader,
41 std::unique_ptr<SetWallpaperDelegate> set_wallpaper_delegate, 43 std::unique_ptr<SetWallpaperDelegate> set_wallpaper_delegate,
42 const scoped_refptr<LocalActivityResolver>& activity_resolver); 44 const scoped_refptr<LocalActivityResolver>& activity_resolver);
43 ~ArcIntentHelperBridge() override; 45 ~ArcIntentHelperBridge() override;
44 46
45 // ArcBridgeService::Observer 47 // InstanceHolder<mojom::IntentHelperInstance>::Observer
46 void OnIntentHelperInstanceReady() override; 48 void OnInstanceReady() override;
47 void OnIntentHelperInstanceClosed() override; 49 void OnInstanceClosed() 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
« no previous file with comments | « components/arc/intent_helper/activity_icon_loader.cc ('k') | components/arc/intent_helper/arc_intent_helper_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698