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 #include "webkit/glue/context_menu.h" | 5 #include "webkit/glue/context_menu.h" |
6 #include "webkit/glue/glue_serialize.h" | 6 #include "webkit/glue/glue_serialize.h" |
7 | 7 |
8 namespace webkit_glue { | 8 namespace webkit_glue { |
9 | 9 |
10 const int32 CustomContextMenuContext::kCurrentRenderWidget = kint32max; | 10 const int32 CustomContextMenuContext::kCurrentRenderWidget = kint32max; |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 ContextMenuParams::ContextMenuParams(const WebKit::WebContextMenuData& data) | 31 ContextMenuParams::ContextMenuParams(const WebKit::WebContextMenuData& data) |
32 : media_type(data.mediaType), | 32 : media_type(data.mediaType), |
33 x(data.mousePosition.x), | 33 x(data.mousePosition.x), |
34 y(data.mousePosition.y), | 34 y(data.mousePosition.y), |
35 link_url(data.linkURL), | 35 link_url(data.linkURL), |
36 unfiltered_link_url(data.linkURL), | 36 unfiltered_link_url(data.linkURL), |
37 src_url(data.srcURL), | 37 src_url(data.srcURL), |
38 is_image_blocked(data.isImageBlocked), | 38 is_image_blocked(data.isImageBlocked), |
39 page_url(data.pageURL), | 39 page_url(data.pageURL), |
| 40 keyword_url(data.keywordURL), |
40 frame_url(data.frameURL), | 41 frame_url(data.frameURL), |
41 media_flags(data.mediaFlags), | 42 media_flags(data.mediaFlags), |
42 selection_text(data.selectedText), | 43 selection_text(data.selectedText), |
43 misspelled_word(data.misspelledWord), | 44 misspelled_word(data.misspelledWord), |
44 spellcheck_enabled(data.isSpellCheckingEnabled), | 45 spellcheck_enabled(data.isSpellCheckingEnabled), |
45 is_editable(data.isEditable), | 46 is_editable(data.isEditable), |
46 #if defined(OS_MACOSX) | 47 #if defined(OS_MACOSX) |
47 writing_direction_default(data.writingDirectionDefault), | 48 writing_direction_default(data.writingDirectionDefault), |
48 writing_direction_left_to_right(data.writingDirectionLeftToRight), | 49 writing_direction_left_to_right(data.writingDirectionLeftToRight), |
49 writing_direction_right_to_left(data.writingDirectionRightToLeft), | 50 writing_direction_right_to_left(data.writingDirectionRightToLeft), |
50 #endif // OS_MACOSX | 51 #endif // OS_MACOSX |
51 edit_flags(data.editFlags), | 52 edit_flags(data.editFlags), |
52 security_info(data.securityInfo), | 53 security_info(data.securityInfo), |
53 frame_charset(data.frameEncoding.utf8()) { | 54 frame_charset(data.frameEncoding.utf8()) { |
54 for (size_t i = 0; i < data.dictionarySuggestions.size(); ++i) | 55 for (size_t i = 0; i < data.dictionarySuggestions.size(); ++i) |
55 dictionary_suggestions.push_back(data.dictionarySuggestions[i]); | 56 dictionary_suggestions.push_back(data.dictionarySuggestions[i]); |
56 | 57 |
57 custom_context.is_pepper_menu = false; | 58 custom_context.is_pepper_menu = false; |
58 for (size_t i = 0; i < data.customItems.size(); ++i) | 59 for (size_t i = 0; i < data.customItems.size(); ++i) |
59 custom_items.push_back(WebMenuItem(data.customItems[i])); | 60 custom_items.push_back(WebMenuItem(data.customItems[i])); |
60 | 61 |
61 if (!data.frameHistoryItem.isNull()) { | 62 if (!data.frameHistoryItem.isNull()) { |
62 frame_content_state = | 63 frame_content_state = |
63 webkit_glue::HistoryItemToString(data.frameHistoryItem); | 64 webkit_glue::HistoryItemToString(data.frameHistoryItem); |
64 } | 65 } |
65 } | 66 } |
66 | 67 |
67 ContextMenuParams::~ContextMenuParams() { | 68 ContextMenuParams::~ContextMenuParams() { |
68 } | 69 } |
OLD | NEW |