Chromium Code Reviews| Index: webkit/glue/context_menu.h |
| =================================================================== |
| --- webkit/glue/context_menu.h (revision 9176) |
| +++ webkit/glue/context_menu.h (working copy) |
| @@ -6,7 +6,7 @@ |
| #define WEBKIT_GLUE_CONTEXT_NODE_TYPES_H__ |
| #include "base/basictypes.h" |
| -#include "base/logging.h" |
| +#include "googleurl\src\gurl.h" |
|
scherkus (not reviewing)
2009/02/05 03:22:16
Should these be forward slashes?
jam
2009/02/05 03:25:54
Done.
|
| // The type of node that the user may perform a contextual action on |
| // in the WebView. |
| @@ -53,5 +53,59 @@ |
| explicit ContextNode(int32 t) : type(t) {} |
| }; |
| +// Parameters structure for ViewHostMsg_ContextMenu. |
| +// FIXME(beng): This would be more useful in the future and more efficient |
| +// if the parameters here weren't so literally mapped to what |
| +// they contain for the ContextMenu task. It might be better |
| +// to make the string fields more generic so that this object |
| +// could be used for more contextual actions. |
| +struct ContextMenuParams { |
| + // This is the type of Context Node that the context menu was invoked on. |
| + ContextNode node; |
| + |
| + // These values represent the coordinates of the mouse when the context menu |
| + // was invoked. Coords are relative to the associated RenderView's origin. |
| + int x; |
| + int y; |
| + |
| + // This is the URL of the link that encloses the node the context menu was |
| + // invoked on. |
| + GURL link_url; |
| + |
| + // This is the URL of the image the context menu was invoked on. |
| + GURL image_url; |
| + |
| + // This is the URL of the top level page that the context menu was invoked |
| + // on. |
| + GURL page_url; |
| + |
| + // This is the URL of the subframe that the context menu was invoked on. |
| + GURL frame_url; |
| + |
| + // This is the text of the selection that the context menu was invoked on. |
| + std::wstring selection_text; |
| + |
| + // The misspelled word under the cursor, if any. Used to generate the |
| + // |dictionary_suggestions| list. |
| + std::wstring misspelled_word; |
| + |
| + // Suggested replacements for a misspelled word under the cursor. |
| + // This vector gets populated in the render process host |
| + // by intercepting ViewHostMsg_ContextMenu in ResourceMessageFilter |
| + // and populating dictionary_suggestions if the type is EDITABLE |
| + // and the misspelled_word is not empty. |
| + std::vector<std::wstring> dictionary_suggestions; |
| + |
| + // If editable, flag for whether spell check is enabled or not. |
| + bool spellcheck_enabled; |
| + |
| + // These flags indicate to the browser whether the renderer believes it is |
| + // able to perform the corresponding action. |
| + int edit_flags; |
| + |
| + // The security info for the resource we are showing the menu on. |
| + std::string security_info; |
| +}; |
| + |
| #endif // WEBKIT_GLUE_CONTEXT_NODE_TYPES_H__ |
| Property changes on: webkit\glue\context_menu.h |
| ___________________________________________________________________ |
| Added: svn:mergeinfo |
| Merged /branches/chrome_webkit_merge_branch/src/webkit/glue/context_node_types.h:r3734-4217,4606-5108,5177-5263 |