| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_ | 5 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_ |
| 6 #define CHROME_COMMON_RENDER_MESSAGES_H_ | 6 #define CHROME_COMMON_RENDER_MESSAGES_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 // |dictionary_suggestions| list. | 151 // |dictionary_suggestions| list. |
| 152 std::wstring misspelled_word; | 152 std::wstring misspelled_word; |
| 153 | 153 |
| 154 // Suggested replacements for a misspelled word under the cursor. | 154 // Suggested replacements for a misspelled word under the cursor. |
| 155 // This vector gets populated in the render process host | 155 // This vector gets populated in the render process host |
| 156 // by intercepting ViewHostMsg_ContextMenu in ResourceMessageFilter | 156 // by intercepting ViewHostMsg_ContextMenu in ResourceMessageFilter |
| 157 // and populating dictionary_suggestions if the type is EDITABLE | 157 // and populating dictionary_suggestions if the type is EDITABLE |
| 158 // and the misspelled_word is not empty. | 158 // and the misspelled_word is not empty. |
| 159 std::vector<std::wstring> dictionary_suggestions; | 159 std::vector<std::wstring> dictionary_suggestions; |
| 160 | 160 |
| 161 // If editable, flag for whether spell check is enabled or not. |
| 162 bool spellcheck_enabled; |
| 163 |
| 161 // These flags indicate to the browser whether the renderer believes it is | 164 // These flags indicate to the browser whether the renderer believes it is |
| 162 // able to perform the corresponding action. | 165 // able to perform the corresponding action. |
| 163 int edit_flags; | 166 int edit_flags; |
| 164 | 167 |
| 165 // The security info for the resource we are showing the menu on. | 168 // The security info for the resource we are showing the menu on. |
| 166 std::string security_info; | 169 std::string security_info; |
| 167 }; | 170 }; |
| 168 | 171 |
| 169 // Values that may be OR'd together to form the 'flags' parameter of a | 172 // Values that may be OR'd together to form the 'flags' parameter of a |
| 170 // ViewHostMsg_PaintRect message. | 173 // ViewHostMsg_PaintRect message. |
| (...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 938 WriteParam(m, p.type); | 941 WriteParam(m, p.type); |
| 939 WriteParam(m, p.x); | 942 WriteParam(m, p.x); |
| 940 WriteParam(m, p.y); | 943 WriteParam(m, p.y); |
| 941 WriteParam(m, p.link_url); | 944 WriteParam(m, p.link_url); |
| 942 WriteParam(m, p.image_url); | 945 WriteParam(m, p.image_url); |
| 943 WriteParam(m, p.page_url); | 946 WriteParam(m, p.page_url); |
| 944 WriteParam(m, p.frame_url); | 947 WriteParam(m, p.frame_url); |
| 945 WriteParam(m, p.selection_text); | 948 WriteParam(m, p.selection_text); |
| 946 WriteParam(m, p.misspelled_word); | 949 WriteParam(m, p.misspelled_word); |
| 947 WriteParam(m, p.dictionary_suggestions); | 950 WriteParam(m, p.dictionary_suggestions); |
| 951 WriteParam(m, p.spellcheck_enabled); |
| 948 WriteParam(m, p.edit_flags); | 952 WriteParam(m, p.edit_flags); |
| 949 WriteParam(m, p.security_info); | 953 WriteParam(m, p.security_info); |
| 950 } | 954 } |
| 951 static bool Read(const Message* m, void** iter, param_type* p) { | 955 static bool Read(const Message* m, void** iter, param_type* p) { |
| 952 return | 956 return |
| 953 ReadParam(m, iter, &p->type) && | 957 ReadParam(m, iter, &p->type) && |
| 954 ReadParam(m, iter, &p->x) && | 958 ReadParam(m, iter, &p->x) && |
| 955 ReadParam(m, iter, &p->y) && | 959 ReadParam(m, iter, &p->y) && |
| 956 ReadParam(m, iter, &p->link_url) && | 960 ReadParam(m, iter, &p->link_url) && |
| 957 ReadParam(m, iter, &p->image_url) && | 961 ReadParam(m, iter, &p->image_url) && |
| 958 ReadParam(m, iter, &p->page_url) && | 962 ReadParam(m, iter, &p->page_url) && |
| 959 ReadParam(m, iter, &p->frame_url) && | 963 ReadParam(m, iter, &p->frame_url) && |
| 960 ReadParam(m, iter, &p->selection_text) && | 964 ReadParam(m, iter, &p->selection_text) && |
| 961 ReadParam(m, iter, &p->misspelled_word) && | 965 ReadParam(m, iter, &p->misspelled_word) && |
| 962 ReadParam(m, iter, &p->dictionary_suggestions) && | 966 ReadParam(m, iter, &p->dictionary_suggestions) && |
| 967 ReadParam(m, iter, &p->spellcheck_enabled) && |
| 963 ReadParam(m, iter, &p->edit_flags) && | 968 ReadParam(m, iter, &p->edit_flags) && |
| 964 ReadParam(m, iter, &p->security_info); | 969 ReadParam(m, iter, &p->security_info); |
| 965 } | 970 } |
| 966 static void Log(const param_type& p, std::wstring* l) { | 971 static void Log(const param_type& p, std::wstring* l) { |
| 967 l->append(L"<ViewHostMsg_ContextMenu_Params>"); | 972 l->append(L"<ViewHostMsg_ContextMenu_Params>"); |
| 968 } | 973 } |
| 969 }; | 974 }; |
| 970 | 975 |
| 971 // Traits for ViewHostMsg_PaintRect_Params structure to pack/unpack. | 976 // Traits for ViewHostMsg_PaintRect_Params structure to pack/unpack. |
| 972 template <> | 977 template <> |
| (...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1705 ReadParam(m, iter, &p->available_rect); | 1710 ReadParam(m, iter, &p->available_rect); |
| 1706 } | 1711 } |
| 1707 static void Log(const param_type& p, std::wstring* l) { | 1712 static void Log(const param_type& p, std::wstring* l) { |
| 1708 l->append(L"<webkit_glue::ScreenInfo>"); | 1713 l->append(L"<webkit_glue::ScreenInfo>"); |
| 1709 } | 1714 } |
| 1710 }; | 1715 }; |
| 1711 | 1716 |
| 1712 } // namespace IPC | 1717 } // namespace IPC |
| 1713 | 1718 |
| 1714 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ | 1719 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ |
| OLD | NEW |