| OLD | NEW |
| 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 CONTENT_PUBLIC_COMMON_CONTEXT_MENU_PARAMS_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_CONTEXT_MENU_PARAMS_H_ |
| 6 #define CONTENT_PUBLIC_COMMON_CONTEXT_MENU_PARAMS_H_ | 6 #define CONTENT_PUBLIC_COMMON_CONTEXT_MENU_PARAMS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 // FIXME(beng): This would be more useful in the future and more efficient | 41 // FIXME(beng): This would be more useful in the future and more efficient |
| 42 // if the parameters here weren't so literally mapped to what | 42 // if the parameters here weren't so literally mapped to what |
| 43 // they contain for the ContextMenu task. It might be better | 43 // they contain for the ContextMenu task. It might be better |
| 44 // to make the string fields more generic so that this object | 44 // to make the string fields more generic so that this object |
| 45 // could be used for more contextual actions. | 45 // could be used for more contextual actions. |
| 46 struct CONTENT_EXPORT ContextMenuParams { | 46 struct CONTENT_EXPORT ContextMenuParams { |
| 47 ContextMenuParams(); | 47 ContextMenuParams(); |
| 48 ~ContextMenuParams(); | 48 ~ContextMenuParams(); |
| 49 | 49 |
| 50 // This is the type of Context Node that the context menu was invoked on. | 50 // This is the type of Context Node that the context menu was invoked on. |
| 51 WebKit::WebContextMenuData::MediaType media_type; | 51 blink::WebContextMenuData::MediaType media_type; |
| 52 | 52 |
| 53 // These values represent the coordinates of the mouse when the context menu | 53 // These values represent the coordinates of the mouse when the context menu |
| 54 // was invoked. Coords are relative to the associated RenderView's origin. | 54 // was invoked. Coords are relative to the associated RenderView's origin. |
| 55 int x; | 55 int x; |
| 56 int y; | 56 int y; |
| 57 | 57 |
| 58 // This is the URL of the link that encloses the node the context menu was | 58 // This is the URL of the link that encloses the node the context menu was |
| 59 // invoked on. | 59 // invoked on. |
| 60 GURL link_url; | 60 GURL link_url; |
| 61 | 61 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 // able to perform the corresponding action. | 136 // able to perform the corresponding action. |
| 137 int edit_flags; | 137 int edit_flags; |
| 138 | 138 |
| 139 // The security info for the resource we are showing the menu on. | 139 // The security info for the resource we are showing the menu on. |
| 140 SSLStatus security_info; | 140 SSLStatus security_info; |
| 141 | 141 |
| 142 // The character encoding of the frame on which the menu is invoked. | 142 // The character encoding of the frame on which the menu is invoked. |
| 143 std::string frame_charset; | 143 std::string frame_charset; |
| 144 | 144 |
| 145 // The referrer policy of the frame on which the menu is invoked. | 145 // The referrer policy of the frame on which the menu is invoked. |
| 146 WebKit::WebReferrerPolicy referrer_policy; | 146 blink::WebReferrerPolicy referrer_policy; |
| 147 | 147 |
| 148 CustomContextMenuContext custom_context; | 148 CustomContextMenuContext custom_context; |
| 149 std::vector<MenuItem> custom_items; | 149 std::vector<MenuItem> custom_items; |
| 150 | 150 |
| 151 ui::MenuSourceType source_type; | 151 ui::MenuSourceType source_type; |
| 152 | 152 |
| 153 #if defined(OS_ANDROID) | 153 #if defined(OS_ANDROID) |
| 154 // Points representing the coordinates in the document space of the start and | 154 // Points representing the coordinates in the document space of the start and |
| 155 // end of the selection, if there is one. | 155 // end of the selection, if there is one. |
| 156 gfx::Point selection_start; | 156 gfx::Point selection_start; |
| 157 gfx::Point selection_end; | 157 gfx::Point selection_end; |
| 158 #endif | 158 #endif |
| 159 }; | 159 }; |
| 160 | 160 |
| 161 } // namespace content | 161 } // namespace content |
| 162 | 162 |
| 163 #endif // CONTENT_PUBLIC_COMMON_CONTEXT_MENU_PARAMS_H_ | 163 #endif // CONTENT_PUBLIC_COMMON_CONTEXT_MENU_PARAMS_H_ |
| OLD | NEW |