OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "content/renderer/context_menu_params_builder.h" | 5 #include "content/renderer/context_menu_params_builder.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "content/common/ssl_status_serialization.h" | 8 #include "content/common/ssl_status_serialization.h" |
9 #include "content/public/common/context_menu_params.h" | 9 #include "content/public/common/context_menu_params.h" |
10 #include "content/public/renderer/history_item_serialization.h" | 10 #include "content/public/renderer/history_item_serialization.h" |
11 #include "content/renderer/menu_item_builder.h" | 11 #include "content/renderer/menu_item_builder.h" |
12 #include "third_party/WebKit/public/web/WebElement.h" | 12 #include "third_party/WebKit/public/web/WebElement.h" |
13 #include "third_party/WebKit/public/web/WebNode.h" | 13 #include "third_party/WebKit/public/web/WebNode.h" |
14 | 14 |
15 namespace content { | 15 namespace content { |
16 | 16 |
17 // static | 17 // static |
18 ContextMenuParams ContextMenuParamsBuilder::Build( | 18 ContextMenuParams ContextMenuParamsBuilder::Build( |
19 const WebKit::WebContextMenuData& data) { | 19 const WebKit::WebContextMenuData& data) { |
20 ContextMenuParams params; | 20 ContextMenuParams params; |
21 params.media_type = data.mediaType; | 21 params.media_type = data.mediaType; |
22 params.x = data.mousePosition.x; | 22 params.x = data.mousePosition.x; |
23 params.y = data.mousePosition.y; | 23 params.y = data.mousePosition.y; |
24 params.link_url = data.linkURL; | 24 params.link_url = data.linkURL; |
25 params.unfiltered_link_url = data.linkURL; | 25 params.unfiltered_link_url = data.linkURL; |
26 params.src_url = data.srcURL; | 26 params.src_url = data.srcURL; |
27 params.is_image_blocked = data.isImageBlocked; | 27 params.has_image_contents = data.hasImageContents; |
28 params.page_url = data.pageURL; | 28 params.page_url = data.pageURL; |
29 params.keyword_url = data.keywordURL; | 29 params.keyword_url = data.keywordURL; |
30 params.frame_url = data.frameURL; | 30 params.frame_url = data.frameURL; |
31 params.media_flags = data.mediaFlags; | 31 params.media_flags = data.mediaFlags; |
32 params.selection_text = data.selectedText; | 32 params.selection_text = data.selectedText; |
33 params.misspelled_word = data.misspelledWord; | 33 params.misspelled_word = data.misspelledWord; |
34 params.misspelling_hash = data.misspellingHash; | 34 params.misspelling_hash = data.misspellingHash; |
35 params.speech_input_enabled = data.isSpeechInputEnabled; | 35 params.speech_input_enabled = data.isSpeechInputEnabled; |
36 params.spellcheck_enabled = data.isSpellCheckingEnabled; | 36 params.spellcheck_enabled = data.isSpellCheckingEnabled; |
37 params.is_editable = data.isEditable; | 37 params.is_editable = data.isEditable; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 ¶ms.security_info.cert_id, | 79 ¶ms.security_info.cert_id, |
80 ¶ms.security_info.cert_status, | 80 ¶ms.security_info.cert_status, |
81 ¶ms.security_info.security_bits, | 81 ¶ms.security_info.security_bits, |
82 ¶ms.security_info.connection_status); | 82 ¶ms.security_info.connection_status); |
83 } | 83 } |
84 | 84 |
85 return params; | 85 return params; |
86 } | 86 } |
87 | 87 |
88 } // namespace content | 88 } // namespace content |
OLD | NEW |