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

Unified 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, 9 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 side-by-side diff with in-line comments
Download patch
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 0754bf0a82103e0e89b2c8661ff4cad552021e38..beeb863c4ac6181fcd73507630966b4336314062 100644
--- a/components/arc/intent_helper/arc_intent_helper_bridge.h
+++ b/components/arc/intent_helper/arc_intent_helper_bridge.h
@@ -5,10 +5,12 @@
#ifndef COMPONENTS_ARC_INTENT_HELPER_ARC_INTENT_HELPER_BRIDGE_H_
#define COMPONENTS_ARC_INTENT_HELPER_ARC_INTENT_HELPER_BRIDGE_H_
+#include "ash/renderer_context_menu/open_with_menu_controller.h"
#include "base/macros.h"
#include "components/arc/arc_bridge_service.h"
#include "components/arc/arc_service.h"
#include "components/arc/common/intent_helper.mojom.h"
+#include "components/arc/intent_helper/open_with_menu_observer.h"
#include "mojo/public/cpp/bindings/binding.h"
namespace arc {
@@ -16,17 +18,26 @@ namespace arc {
// Receives intents from ARC.
class ArcIntentHelperBridge : public ArcService,
public ArcBridgeService::Observer,
- public IntentHelperHost {
+ public IntentHelperHost,
+ public ash::OpenWithMenuController::Delegate {
public:
explicit ArcIntentHelperBridge(ArcBridgeService* bridge_service);
~ArcIntentHelperBridge() override;
// ArcBridgeService::Observer
void OnIntentHelperInstanceReady() override;
+ void OnIntentHelperInstanceClosed() override;
// arc::IntentHelperHost
void OnOpenUrl(const mojo::String& url) override;
+ // ash::OpenWithMenuController::Delegate
+ RenderViewContextMenuObserver* CreateMenu(RenderViewContextMenuProxy* proxy,
+ int menu_id_start,
+ size_t num_menu_items,
+ int sub_menu_id_start,
+ size_t num_sub_menu_items) override;
+
private:
mojo::Binding<IntentHelperHost> binding_;

Powered by Google App Engine
This is Rietveld 408576698