| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 int32 render_widget_id; | 32 int32 render_widget_id; |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 // FIXME(beng): This would be more useful in the future and more efficient | 35 // FIXME(beng): This would be more useful in the future and more efficient |
| 36 // if the parameters here weren't so literally mapped to what | 36 // if the parameters here weren't so literally mapped to what |
| 37 // they contain for the ContextMenu task. It might be better | 37 // they contain for the ContextMenu task. It might be better |
| 38 // to make the string fields more generic so that this object | 38 // to make the string fields more generic so that this object |
| 39 // could be used for more contextual actions. | 39 // could be used for more contextual actions. |
| 40 struct CONTENT_EXPORT ContextMenuParams { | 40 struct CONTENT_EXPORT ContextMenuParams { |
| 41 ContextMenuParams(); | 41 ContextMenuParams(); |
| 42 ContextMenuParams(const WebKit::WebContextMenuData& data); | 42 explicit ContextMenuParams(const WebKit::WebContextMenuData& data); |
| 43 ~ContextMenuParams(); | 43 ~ContextMenuParams(); |
| 44 | 44 |
| 45 // This is the type of Context Node that the context menu was invoked on. | 45 // This is the type of Context Node that the context menu was invoked on. |
| 46 WebKit::WebContextMenuData::MediaType media_type; | 46 WebKit::WebContextMenuData::MediaType media_type; |
| 47 | 47 |
| 48 // These values represent the coordinates of the mouse when the context menu | 48 // These values represent the coordinates of the mouse when the context menu |
| 49 // was invoked. Coords are relative to the associated RenderView's origin. | 49 // was invoked. Coords are relative to the associated RenderView's origin. |
| 50 int x; | 50 int x; |
| 51 int y; | 51 int y; |
| 52 | 52 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 // The referrer policy of the frame on which the menu is invoked. | 132 // The referrer policy of the frame on which the menu is invoked. |
| 133 WebKit::WebReferrerPolicy referrer_policy; | 133 WebKit::WebReferrerPolicy referrer_policy; |
| 134 | 134 |
| 135 CustomContextMenuContext custom_context; | 135 CustomContextMenuContext custom_context; |
| 136 std::vector<WebMenuItem> custom_items; | 136 std::vector<WebMenuItem> custom_items; |
| 137 }; | 137 }; |
| 138 | 138 |
| 139 } // namespace content | 139 } // namespace content |
| 140 | 140 |
| 141 #endif // CONTENT_PUBLIC_COMMON_CONTEXT_MENU_PARAMS_H_ | 141 #endif // CONTENT_PUBLIC_COMMON_CONTEXT_MENU_PARAMS_H_ |
| OLD | NEW |