| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "content/common/ssl_status_serialization.h" | |
| 10 #include "content/public/common/context_menu_params.h" | 9 #include "content/public/common/context_menu_params.h" |
| 11 #include "content/public/renderer/content_renderer_client.h" | 10 #include "content/public/renderer/content_renderer_client.h" |
| 12 #include "content/renderer/history_serialization.h" | 11 #include "content/renderer/history_serialization.h" |
| 13 #include "content/renderer/menu_item_builder.h" | 12 #include "content/renderer/menu_item_builder.h" |
| 14 | 13 |
| 15 namespace content { | 14 namespace content { |
| 16 | 15 |
| 17 // static | 16 // static |
| 18 ContextMenuParams ContextMenuParamsBuilder::Build( | 17 ContextMenuParams ContextMenuParamsBuilder::Build( |
| 19 const blink::WebContextMenuData& data) { | 18 const blink::WebContextMenuData& data) { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 for (size_t i = 0; i < data.customItems.size(); ++i) | 55 for (size_t i = 0; i < data.customItems.size(); ++i) |
| 57 params.custom_items.push_back(MenuItemBuilder::Build(data.customItems[i])); | 56 params.custom_items.push_back(MenuItemBuilder::Build(data.customItems[i])); |
| 58 | 57 |
| 59 if (!data.frameHistoryItem.isNull()) { | 58 if (!data.frameHistoryItem.isNull()) { |
| 60 params.frame_page_state = | 59 params.frame_page_state = |
| 61 SingleHistoryItemToPageState(data.frameHistoryItem); | 60 SingleHistoryItemToPageState(data.frameHistoryItem); |
| 62 } | 61 } |
| 63 | 62 |
| 64 params.link_text = data.linkText; | 63 params.link_text = data.linkText; |
| 65 | 64 |
| 66 // Deserialize the SSL info. | |
| 67 if (!data.securityInfo.isEmpty()) | |
| 68 CHECK(DeserializeSecurityInfo(data.securityInfo, ¶ms.security_info)); | |
| 69 | |
| 70 return params; | 65 return params; |
| 71 } | 66 } |
| 72 | 67 |
| 73 } // namespace content | 68 } // namespace content |
| OLD | NEW |