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

Side by Side Diff: ash/renderer_context_menu/open_with_menu_controller.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 comments 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
(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 ASH_RENDERER_CONTEXT_MENU_OPEN_WITH_MENU_CONTROLLER_H_
6 #define ASH_RENDERER_CONTEXT_MENU_OPEN_WITH_MENU_CONTROLLER_H_
7
8 #include <memory>
9
10 #include "ash/ash_export.h"
11 #include "base/macros.h"
12
13 class GURL;
14
15 namespace ash {
16
17 class LinkHandlerModel;
18
19 // A class for populating and updating "Open with <app>" menu items in a
20 // renderer context menu.
Ben Goodger (Google) 2016/04/20 17:56:50 your class names and comments should not refer to:
Yusuke Sato 2016/04/22 05:27:47 Done.
21 class ASH_EXPORT OpenWithMenuController {
22 public:
23 class Delegate {
24 public:
25 virtual ~Delegate() {}
26 virtual std::unique_ptr<LinkHandlerModel> CreateModel(const GURL& url) = 0;
27 };
28
29 OpenWithMenuController();
30 void SetDelegate(Delegate* delegate);
31
32 // Returns a menu model of the "Open with <app>" context menu. When a menu for
33 // the |url| cannot be created, returns nullptr.
34 std::unique_ptr<LinkHandlerModel> CreateModel(const GURL& url);
35
36 private:
37 Delegate* delegate_;
38
39 DISALLOW_COPY_AND_ASSIGN(OpenWithMenuController);
40 };
41
42 } // namespace ash
43
44 #endif // ASH_RENDERER_CONTEXT_MENU_OPEN_WITH_MENU_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698