OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "webkit/glue/context_menu.h" |
| 6 |
| 7 ContextMenuParams::ContextMenuParams() { |
| 8 } |
| 9 |
| 10 ContextMenuParams::ContextMenuParams(const WebKit::WebContextMenuData& data) |
| 11 : media_type(data.mediaType), |
| 12 x(data.mousePosition.x), |
| 13 y(data.mousePosition.y), |
| 14 link_url(data.linkURL), |
| 15 unfiltered_link_url(data.linkURL), |
| 16 src_url(data.srcURL), |
| 17 is_image_blocked(data.isImageBlocked), |
| 18 page_url(data.pageURL), |
| 19 frame_url(data.frameURL), |
| 20 media_flags(data.mediaFlags), |
| 21 selection_text(UTF16ToWideHack(data.selectedText)), |
| 22 misspelled_word(data.misspelledWord), |
| 23 spellcheck_enabled(data.isSpellCheckingEnabled), |
| 24 is_editable(data.isEditable), |
| 25 #if defined(OS_MACOSX) |
| 26 writing_direction_default(data.writingDirectionDefault), |
| 27 writing_direction_left_to_right(data.writingDirectionLeftToRight), |
| 28 writing_direction_right_to_left(data.writingDirectionRightToLeft), |
| 29 #endif // OS_MACOSX |
| 30 edit_flags(data.editFlags), |
| 31 security_info(data.securityInfo), |
| 32 frame_charset(data.frameEncoding.utf8()) { |
| 33 for (size_t i = 0; i < data.customItems.size(); ++i) |
| 34 custom_items.push_back(WebMenuItem(data.customItems[i])); |
| 35 } |
| 36 |
| 37 ContextMenuParams::~ContextMenuParams() { |
| 38 } |
OLD | NEW |