OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 WEBKIT_GLUE_CONTEXT_MENU_H_ | 5 #ifndef WEBKIT_GLUE_CONTEXT_MENU_H_ |
6 #define WEBKIT_GLUE_CONTEXT_MENU_H_ | 6 #define WEBKIT_GLUE_CONTEXT_MENU_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 int edit_flags; | 89 int edit_flags; |
90 | 90 |
91 // The security info for the resource we are showing the menu on. | 91 // The security info for the resource we are showing the menu on. |
92 std::string security_info; | 92 std::string security_info; |
93 | 93 |
94 // The character encoding of the frame on which the menu is invoked. | 94 // The character encoding of the frame on which the menu is invoked. |
95 std::string frame_charset; | 95 std::string frame_charset; |
96 | 96 |
97 std::vector<WebMenuItem> custom_items; | 97 std::vector<WebMenuItem> custom_items; |
98 | 98 |
99 ContextMenuParams() {} | 99 ContextMenuParams(); |
100 | 100 ContextMenuParams(const WebKit::WebContextMenuData& data); |
101 ContextMenuParams(const WebKit::WebContextMenuData& data) | 101 ~ContextMenuParams(); |
102 : media_type(data.mediaType), | |
103 x(data.mousePosition.x), | |
104 y(data.mousePosition.y), | |
105 link_url(data.linkURL), | |
106 unfiltered_link_url(data.linkURL), | |
107 src_url(data.srcURL), | |
108 is_image_blocked(data.isImageBlocked), | |
109 page_url(data.pageURL), | |
110 frame_url(data.frameURL), | |
111 media_flags(data.mediaFlags), | |
112 selection_text(UTF16ToWideHack(data.selectedText)), | |
113 misspelled_word(data.misspelledWord), | |
114 spellcheck_enabled(data.isSpellCheckingEnabled), | |
115 is_editable(data.isEditable), | |
116 #if defined(OS_MACOSX) | |
117 writing_direction_default(data.writingDirectionDefault), | |
118 writing_direction_left_to_right(data.writingDirectionLeftToRight), | |
119 writing_direction_right_to_left(data.writingDirectionRightToLeft), | |
120 #endif // OS_MACOSX | |
121 edit_flags(data.editFlags), | |
122 security_info(data.securityInfo), | |
123 frame_charset(data.frameEncoding.utf8()) { | |
124 for (size_t i = 0; i < data.customItems.size(); ++i) | |
125 custom_items.push_back(WebMenuItem(data.customItems[i])); | |
126 } | |
127 }; | 102 }; |
128 | 103 |
129 #endif // WEBKIT_GLUE_CONTEXT_MENU_H_ | 104 #endif // WEBKIT_GLUE_CONTEXT_MENU_H_ |
OLD | NEW |