Chromium Code Reviews| Index: ash/renderer_context_menu/link_handler_model.h |
| diff --git a/ash/renderer_context_menu/link_handler_model.h b/ash/renderer_context_menu/link_handler_model.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..8c21345bc7b349b8fee1b2890c9a31bafbd527fa |
| --- /dev/null |
| +++ b/ash/renderer_context_menu/link_handler_model.h |
| @@ -0,0 +1,41 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#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.
|
| +#define ASH_RENDERER_CONTEXT_MENU_LINK_HANDLER_MODEL_ |
| + |
| +#include <string> |
| + |
| +#include "ash/ash_export.h" |
| +#include "ui/gfx/image/image.h" |
| + |
| +class GURL; |
| + |
| +namespace ash { |
| + |
| +struct ASH_EXPORT LinkHandlerInfo { |
| + std::string name; |
| + gfx::Image icon; |
| + uint32_t id; |
| +}; |
| + |
| +// A class which represents items in a menu OpenWithMenuController returns. |
| +class ASH_EXPORT LinkHandlerModel { |
| + public: |
| + class Observer { |
| + public: |
| + virtual ~Observer(); |
| + virtual void ModelChanged(const std::vector<LinkHandlerInfo>& handlers) = 0; |
| + }; |
| + |
| + virtual ~LinkHandlerModel(); |
| + virtual void AddObserver(Observer* observer) = 0; |
| + |
| + // Opens the |url| with a handler specified by the |handler_id|. |
| + virtual void OpenLinkWithHandler(const GURL& url, uint32_t handler_id) = 0; |
| +}; |
| + |
| +} // namespace ash |
| + |
| +#endif // ASH_RENDERER_CONTEXT_MENU_OPEN_WITH_ITEMS_H_ |