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

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: add a missing override; 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 "ash/renderer_context_menu/open_with_menu_controller.h"
8 #include "base/macros.h" 9 #include "base/macros.h"
9 #include "components/arc/arc_bridge_service.h" 10 #include "components/arc/arc_bridge_service.h"
10 #include "components/arc/arc_service.h" 11 #include "components/arc/arc_service.h"
11 #include "components/arc/common/intent_helper.mojom.h" 12 #include "components/arc/common/intent_helper.mojom.h"
13 #include "components/arc/intent_helper/open_with_menu_observer.h"
12 #include "mojo/public/cpp/bindings/binding.h" 14 #include "mojo/public/cpp/bindings/binding.h"
13 15
14 namespace arc { 16 namespace arc {
15 17
16 // Receives intents from ARC. 18 // Receives intents from ARC.
17 class ArcIntentHelperBridge : public ArcService, 19 class ArcIntentHelperBridge : public ArcService,
18 public ArcBridgeService::Observer, 20 public ArcBridgeService::Observer,
19 public IntentHelperHost { 21 public IntentHelperHost,
22 public ash::OpenWithMenuController::Delegate {
20 public: 23 public:
21 explicit ArcIntentHelperBridge(ArcBridgeService* bridge_service); 24 explicit ArcIntentHelperBridge(ArcBridgeService* bridge_service);
22 ~ArcIntentHelperBridge() override; 25 ~ArcIntentHelperBridge() override;
23 26
24 // ArcBridgeService::Observer 27 // ArcBridgeService::Observer
25 void OnIntentHelperInstanceReady() override; 28 void OnIntentHelperInstanceReady() override;
29 void OnIntentHelperInstanceClosed() override;
26 30
27 // arc::IntentHelperHost 31 // arc::IntentHelperHost
28 void OnOpenUrl(const mojo::String& url) override; 32 void OnOpenUrl(const mojo::String& url) override;
29 33
34 // ash::OpenWithMenuController::Delegate
35 RenderViewContextMenuObserver* CreateMenu(RenderViewContextMenuProxy* proxy,
36 int menu_id_start,
37 size_t num_menu_items,
38 int sub_menu_id_start,
39 size_t num_sub_menu_items) override;
40
30 private: 41 private:
31 mojo::Binding<IntentHelperHost> binding_; 42 mojo::Binding<IntentHelperHost> binding_;
32 43
33 DISALLOW_COPY_AND_ASSIGN(ArcIntentHelperBridge); 44 DISALLOW_COPY_AND_ASSIGN(ArcIntentHelperBridge);
34 }; 45 };
35 46
36 } // namespace arc 47 } // namespace arc
37 48
38 #endif // COMPONENTS_ARC_INTENT_HELPER_ARC_INTENT_HELPER_BRIDGE_H_ 49 #endif // COMPONENTS_ARC_INTENT_HELPER_ARC_INTENT_HELPER_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698