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

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

Issue 1760773004: Add "Open with <ARC-app-name>" items to the context menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address dcheng's comment Created 4 years, 8 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>
9
10 #include "ash/link_handler_model_factory.h"
8 #include "base/macros.h" 11 #include "base/macros.h"
9 #include "components/arc/arc_bridge_service.h" 12 #include "components/arc/arc_bridge_service.h"
10 #include "components/arc/arc_service.h" 13 #include "components/arc/arc_service.h"
11 #include "components/arc/common/intent_helper.mojom.h" 14 #include "components/arc/common/intent_helper.mojom.h"
12 #include "mojo/public/cpp/bindings/binding.h" 15 #include "mojo/public/cpp/bindings/binding.h"
13 16
17 namespace ash {
18
19 class LinkHandlerModel;
20
21 } // namespace ash
22
14 namespace arc { 23 namespace arc {
15 24
16 // Receives intents from ARC. 25 // Receives intents from ARC.
17 class ArcIntentHelperBridge : public ArcService, 26 class ArcIntentHelperBridge : public ArcService,
18 public ArcBridgeService::Observer, 27 public ArcBridgeService::Observer,
19 public mojom::IntentHelperHost { 28 public mojom::IntentHelperHost,
29 public ash::LinkHandlerModelFactory {
20 public: 30 public:
21 explicit ArcIntentHelperBridge(ArcBridgeService* bridge_service); 31 explicit ArcIntentHelperBridge(ArcBridgeService* bridge_service);
22 ~ArcIntentHelperBridge() override; 32 ~ArcIntentHelperBridge() override;
23 33
24 // ArcBridgeService::Observer 34 // ArcBridgeService::Observer
25 void OnIntentHelperInstanceReady() override; 35 void OnIntentHelperInstanceReady() override;
36 void OnIntentHelperInstanceClosed() override;
26 37
27 // arc::mojom::IntentHelperHost 38 // arc::mojom::IntentHelperHost
28 void OnOpenUrl(const mojo::String& url) override; 39 void OnOpenUrl(const mojo::String& url) override;
29 40
41 // ash::LinkHandlerModelFactory
42 std::unique_ptr<ash::LinkHandlerModel> CreateModel(const GURL& url) override;
43
30 private: 44 private:
31 mojo::Binding<mojom::IntentHelperHost> binding_; 45 mojo::Binding<mojom::IntentHelperHost> binding_;
32 46
33 DISALLOW_COPY_AND_ASSIGN(ArcIntentHelperBridge); 47 DISALLOW_COPY_AND_ASSIGN(ArcIntentHelperBridge);
34 }; 48 };
35 49
36 } // namespace arc 50 } // namespace arc
37 51
38 #endif // COMPONENTS_ARC_INTENT_HELPER_ARC_INTENT_HELPER_BRIDGE_H_ 52 #endif // COMPONENTS_ARC_INTENT_HELPER_ARC_INTENT_HELPER_BRIDGE_H_
OLDNEW
« no previous file with comments | « components/arc/intent_helper/DEPS ('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