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

Side by Side Diff: chrome/browser/renderer_context_menu/open_with_menu_observer.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: fix unit_tests 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_RENDERER_CONTEXT_MENU_OPEN_WITH_MENU_OBSERVER_H_
6 #define CHROME_BROWSER_RENDERER_CONTEXT_MENU_OPEN_WITH_MENU_OBSERVER_H_
7
8 #include <set>
9
10 #include "base/compiler_specific.h"
11 #include "base/macros.h"
12 #include "components/renderer_context_menu/render_view_context_menu_observer.h"
13
14 class RenderViewContextMenuProxy;
15
16 // An observer that listens to events from the RenderViewContextMenu class and
17 // shows app names received from ARC that can handle the current URL.
18 class OpenWithMenuObserver : public RenderViewContextMenuObserver {
19 public:
20 explicit OpenWithMenuObserver(RenderViewContextMenuProxy* proxy);
21 ~OpenWithMenuObserver() override;
22
23 // RenderViewContextMenuObserver implementation.
24 void InitMenu(const content::ContextMenuParams& params) override;
25 bool IsCommandIdSupported(int command_id) override;
26 bool IsCommandIdChecked(int command_id) override;
27 bool IsCommandIdEnabled(int command_id) override;
28 void ExecuteCommand(int command_id) override;
29 void OnMenuCancel() override;
30
31 private:
32 RenderViewContextMenuProxy* const proxy_;
33 int num_items_initially_enabled_;
34
35 DISALLOW_COPY_AND_ASSIGN(OpenWithMenuObserver);
36 };
37
38 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_OPEN_WITH_MENU_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698