OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_PROXY_H_ | 5 #ifndef COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_PROXY_H_ |
6 #define COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_PROXY_H_ | 6 #define COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_PROXY_H_ |
7 | 7 |
8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
11 class BrowserContext; | 11 class BrowserContext; |
12 class RenderViewHost; | 12 class RenderViewHost; |
13 class WebContents; | 13 class WebContents; |
14 } | 14 } |
15 | 15 |
| 16 namespace ui { |
| 17 class MenuModel; |
| 18 } |
| 19 |
16 // An interface that controls a RenderViewContextMenu instance from observers. | 20 // An interface that controls a RenderViewContextMenu instance from observers. |
17 // This interface is designed mainly for controlling the instance while showing | 21 // This interface is designed mainly for controlling the instance while showing |
18 // so we can add a context-menu item that takes long time to create its text, | 22 // so we can add a context-menu item that takes long time to create its text, |
19 // such as retrieving the item text from a server. The simplest usage is: | 23 // such as retrieving the item text from a server. The simplest usage is: |
20 // 1. Adding an item with temporary text; | 24 // 1. Adding an item with temporary text; |
21 // 2. Posting a background task that creates the item text, and; | 25 // 2. Posting a background task that creates the item text, and; |
22 // 3. Calling UpdateMenuItem() in the callback function. | 26 // 3. Calling UpdateMenuItem() in the callback function. |
23 // The following snippet describes the simple usage that updates a context-menu | 27 // The following snippet describes the simple usage that updates a context-menu |
24 // item with this interface. | 28 // item with this interface. |
25 // | 29 // |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 bool hidden, | 90 bool hidden, |
87 const base::string16& title) = 0; | 91 const base::string16& title) = 0; |
88 | 92 |
89 // Retrieve the given associated objects with a context menu. | 93 // Retrieve the given associated objects with a context menu. |
90 virtual content::RenderViewHost* GetRenderViewHost() const = 0; | 94 virtual content::RenderViewHost* GetRenderViewHost() const = 0; |
91 virtual content::WebContents* GetWebContents() const = 0; | 95 virtual content::WebContents* GetWebContents() const = 0; |
92 virtual content::BrowserContext* GetBrowserContext() const = 0; | 96 virtual content::BrowserContext* GetBrowserContext() const = 0; |
93 }; | 97 }; |
94 | 98 |
95 #endif // COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_PROXY_H_ | 99 #endif // COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_PROXY_H_ |
OLD | NEW |