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

Side by Side Diff: chrome/browser/tab_contents/render_view_context_menu.h

Issue 9045007: Allow plugins to participate in Chrome context menus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_
6 #define CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ 6 #define CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 21 matching lines...) Expand all
32 namespace content { 32 namespace content {
33 class WebContents; 33 class WebContents;
34 } 34 }
35 35
36 namespace gfx { 36 namespace gfx {
37 class Point; 37 class Point;
38 } 38 }
39 39
40 namespace WebKit { 40 namespace WebKit {
41 struct WebMediaPlayerAction; 41 struct WebMediaPlayerAction;
42 struct WebPluginAction;
42 } 43 }
43 44
44 // An interface that controls a RenderViewContextMenu instance from observers. 45 // An interface that controls a RenderViewContextMenu instance from observers.
45 // This interface is designed mainly for controlling the instance while showing 46 // This interface is designed mainly for controlling the instance while showing
46 // so we can add a context-menu item that takes long time to create its text, 47 // so we can add a context-menu item that takes long time to create its text,
47 // such as retrieving the item text from a server. The simplest usage is: 48 // such as retrieving the item text from a server. The simplest usage is:
48 // 1. Adding an item with temporary text; 49 // 1. Adding an item with temporary text;
49 // 2. Posting a background task that creates the item text, and; 50 // 2. Posting a background task that creates the item text, and;
50 // 3. Calling UpdateMenuItem() in the callback function. 51 // 3. Calling UpdateMenuItem() in the callback function.
51 // The following snippet describes the simple usage that updates a context-menu 52 // The following snippet describes the simple usage that updates a context-menu
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 void CopyImageAt(int x, int y); 244 void CopyImageAt(int x, int y);
244 245
245 // Launch the inspector targeting a point in the RenderView 246 // Launch the inspector targeting a point in the RenderView
246 void Inspect(int x, int y); 247 void Inspect(int x, int y);
247 248
248 // Writes the specified text/url to the system clipboard 249 // Writes the specified text/url to the system clipboard
249 void WriteURLToClipboard(const GURL& url); 250 void WriteURLToClipboard(const GURL& url);
250 251
251 void MediaPlayerActionAt(const gfx::Point& location, 252 void MediaPlayerActionAt(const gfx::Point& location,
252 const WebKit::WebMediaPlayerAction& action); 253 const WebKit::WebMediaPlayerAction& action);
254 void PluginActionAt(const gfx::Point& location,
255 const WebKit::WebPluginAction& action);
253 256
254 bool IsDevCommandEnabled(int id) const; 257 bool IsDevCommandEnabled(int id) const;
255 258
256 // Returns a list of registered ProtocolHandlers that can handle the clicked 259 // Returns a list of registered ProtocolHandlers that can handle the clicked
257 // on URL. 260 // on URL.
258 ProtocolHandlerRegistry::ProtocolHandlerList GetHandlersForLinkUrl(); 261 ProtocolHandlerRegistry::ProtocolHandlerList GetHandlersForLinkUrl();
259 262
260 // Returns a (possibly truncated) version of the current selection text 263 // Returns a (possibly truncated) version of the current selection text
261 // suitable or putting in the title of a menu item. 264 // suitable or putting in the title of a menu item.
262 string16 PrintableSelectionText(); 265 string16 PrintableSelectionText();
(...skipping 17 matching lines...) Expand all
280 // An observer that disables menu items when print preview is active. 283 // An observer that disables menu items when print preview is active.
281 scoped_ptr<PrintPreviewContextMenuObserver> print_preview_menu_observer_; 284 scoped_ptr<PrintPreviewContextMenuObserver> print_preview_menu_observer_;
282 285
283 // Our observers. 286 // Our observers.
284 mutable ObserverList<RenderViewContextMenuObserver> observers_; 287 mutable ObserverList<RenderViewContextMenuObserver> observers_;
285 288
286 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); 289 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu);
287 }; 290 };
288 291
289 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ 292 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/tab_contents/render_view_context_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698