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

Side by Side Diff: content/public/renderer/context_menu_client.h

Issue 11083002: Allow custom context menus to be requested. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 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 CONTENT_PUBLIC_RENDERER_CONTEXT_MENU_CLIENT_H_
6 #define CONTENT_PUBLIC_RENDERER_CONTEXT_MENU_CLIENT_H_
7
8 #include "base/basictypes.h"
9 #include "content/common/content_export.h"
10
11 namespace content {
12
13 // This mirrors the WebKit API in that the "action selected" and "menu closed"
14 // events are separate. When the user selects and item you'll get both events.
15 // If the user clicks somewhere else and cancels the menu, you'll just get the
16 // "closed" event.
17 class CONTENT_EXPORT ContextMenuClient {
18 public:
19 // Called when the user selects a context menu item. The request ID will be
20 // the value returned by RenderView.ShowCustomContextMenu. This will be
21 // followed by a call to OnCustomContextMenuClosed.
22 virtual void OnCustomContextMenuAction(int request_id, unsigned action) = 0;
jam 2012/10/10 04:01:43 nit: since ContextMenu is in the interface name, i
brettw 2012/10/10 05:10:17 I was originally thinking this would be implemente
23
24 // Called when the context menu is closed. The request ID will be the value
25 // returned by RenderView.ShowCustomContextMenu.
26 virtual void OnCustomContextMenuClosed(int request_id) = 0;
27
28 protected:
29 virtual ~ContextMenuClient() {}
30 };
31
32 } // namespace content
33
34 #endif // CONTENT_PUBLIC_RENDERER_CONTEXT_MENU_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698