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

Side by Side Diff: ash/renderer_context_menu/link_handler_model.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_LINK_HANDLER_MODEL_
Ben Goodger (Google) 2016/04/20 17:56:49 ash shouldn't know about the concept of a renderer
Yusuke Sato 2016/04/22 05:27:47 Done.
6 #define ASH_RENDERER_CONTEXT_MENU_LINK_HANDLER_MODEL_
7
8 #include <string>
9
10 #include "ash/ash_export.h"
11 #include "ui/gfx/image/image.h"
12
13 class GURL;
14
15 namespace ash {
16
17 struct ASH_EXPORT LinkHandlerInfo {
18 std::string name;
19 gfx::Image icon;
20 uint32_t id;
21 };
22
23 // A class which represents items in a menu OpenWithMenuController returns.
24 class ASH_EXPORT LinkHandlerModel {
25 public:
26 class Observer {
27 public:
28 virtual ~Observer();
29 virtual void ModelChanged(const std::vector<LinkHandlerInfo>& handlers) = 0;
30 };
31
32 virtual ~LinkHandlerModel();
33 virtual void AddObserver(Observer* observer) = 0;
34
35 // Opens the |url| with a handler specified by the |handler_id|.
36 virtual void OpenLinkWithHandler(const GURL& url, uint32_t handler_id) = 0;
37 };
38
39 } // namespace ash
40
41 #endif // ASH_RENDERER_CONTEXT_MENU_OPEN_WITH_ITEMS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698