OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 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 CustomContextMenuContext::CustomContextMenuContext() | 10 CustomContextMenuContext::CustomContextMenuContext() |
11 : is_pepper_menu(false), | 11 : is_pepper_menu(false), |
12 request_id(0) { | 12 request_id(0) { |
13 } | 13 } |
14 | 14 |
15 } // namespace webkit_glue | 15 } // namespace webkit_glue |
16 | 16 |
17 ContextMenuParams::ContextMenuParams() { | 17 ContextMenuParams::ContextMenuParams() |
| 18 : media_type(WebKit::WebContextMenuData::MediaTypeNone), |
| 19 x(0), |
| 20 y(0), |
| 21 media_flags(0), |
| 22 spellcheck_enabled(false), |
| 23 is_editable(false), |
| 24 #if defined(OS_MACOSX) |
| 25 writing_direction_default(0), |
| 26 writing_direction_left_to_right(0), |
| 27 writing_direction_right_to_left(0), |
| 28 #endif // OS_MACOSX |
| 29 edit_flags(0) { |
18 } | 30 } |
19 | 31 |
20 ContextMenuParams::ContextMenuParams(const WebKit::WebContextMenuData& data) | 32 ContextMenuParams::ContextMenuParams(const WebKit::WebContextMenuData& data) |
21 : media_type(data.mediaType), | 33 : media_type(data.mediaType), |
22 x(data.mousePosition.x), | 34 x(data.mousePosition.x), |
23 y(data.mousePosition.y), | 35 y(data.mousePosition.y), |
24 link_url(data.linkURL), | 36 link_url(data.linkURL), |
25 unfiltered_link_url(data.linkURL), | 37 unfiltered_link_url(data.linkURL), |
26 src_url(data.srcURL), | 38 src_url(data.srcURL), |
27 is_image_blocked(data.isImageBlocked), | 39 is_image_blocked(data.isImageBlocked), |
(...skipping 17 matching lines...) Expand all Loading... |
45 custom_items.push_back(WebMenuItem(data.customItems[i])); | 57 custom_items.push_back(WebMenuItem(data.customItems[i])); |
46 | 58 |
47 if (!data.frameHistoryItem.isNull()) { | 59 if (!data.frameHistoryItem.isNull()) { |
48 frame_content_state = | 60 frame_content_state = |
49 webkit_glue::HistoryItemToString(data.frameHistoryItem); | 61 webkit_glue::HistoryItemToString(data.frameHistoryItem); |
50 } | 62 } |
51 } | 63 } |
52 | 64 |
53 ContextMenuParams::~ContextMenuParams() { | 65 ContextMenuParams::~ContextMenuParams() { |
54 } | 66 } |
OLD | NEW |