| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 int32 render_widget_id; | 35 int32 render_widget_id; |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 // FIXME(beng): This would be more useful in the future and more efficient | 38 // FIXME(beng): This would be more useful in the future and more efficient |
| 39 // if the parameters here weren't so literally mapped to what | 39 // if the parameters here weren't so literally mapped to what |
| 40 // they contain for the ContextMenu task. It might be better | 40 // they contain for the ContextMenu task. It might be better |
| 41 // to make the string fields more generic so that this object | 41 // to make the string fields more generic so that this object |
| 42 // could be used for more contextual actions. | 42 // could be used for more contextual actions. |
| 43 struct CONTENT_EXPORT ContextMenuParams { | 43 struct CONTENT_EXPORT ContextMenuParams { |
| 44 ContextMenuParams(); | 44 ContextMenuParams(); |
| 45 explicit ContextMenuParams(const WebKit::WebContextMenuData& data); | |
| 46 ~ContextMenuParams(); | 45 ~ContextMenuParams(); |
| 47 | 46 |
| 48 // This is the type of Context Node that the context menu was invoked on. | 47 // This is the type of Context Node that the context menu was invoked on. |
| 49 WebKit::WebContextMenuData::MediaType media_type; | 48 WebKit::WebContextMenuData::MediaType media_type; |
| 50 | 49 |
| 51 // These values represent the coordinates of the mouse when the context menu | 50 // These values represent the coordinates of the mouse when the context menu |
| 52 // was invoked. Coords are relative to the associated RenderView's origin. | 51 // was invoked. Coords are relative to the associated RenderView's origin. |
| 53 int x; | 52 int x; |
| 54 int y; | 53 int y; |
| 55 | 54 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 // end of the selection, if there is one. | 147 // end of the selection, if there is one. |
| 149 gfx::Point selection_start; | 148 gfx::Point selection_start; |
| 150 gfx::Point selection_end; | 149 gfx::Point selection_end; |
| 151 #endif | 150 #endif |
| 152 | 151 |
| 153 }; | 152 }; |
| 154 | 153 |
| 155 } // namespace content | 154 } // namespace content |
| 156 | 155 |
| 157 #endif // CONTENT_PUBLIC_COMMON_CONTEXT_MENU_PARAMS_H_ | 156 #endif // CONTENT_PUBLIC_COMMON_CONTEXT_MENU_PARAMS_H_ |
| OLD | NEW |