Chromium Code Reviews| Index: chrome/common/automation_messages.h |
| =================================================================== |
| --- chrome/common/automation_messages.h (revision 87452) |
| +++ chrome/common/automation_messages.h (working copy) |
| @@ -22,6 +22,8 @@ |
| #ifndef CHROME_COMMON_AUTOMATION_MESSAGES_H__ |
| #define CHROME_COMMON_AUTOMATION_MESSAGES_H__ |
| +struct AutocompleteMatch; |
| + |
| struct AutomationMsg_Find_Params { |
| // Unused value, which exists only for backwards compat. |
| int unused; |
| @@ -202,6 +204,24 @@ |
| int load_flags; // see net/base/load_flags.h |
| }; |
| +// The purpose of this class is to act as a serializable version of |
| +// AutocompleteMatch. The reason for this class is because we don't want to |
| +// serialize all elements of AutocompleteMatch and we want some data from the |
| +// autocomplete provider without the hassle of serializing it. |
| +struct AutocompleteMatchData { |
|
Peter Kasting
2011/06/01 20:28:33
Nit: This used to have a constructor. It might be
Paweł Hajdan Jr.
2011/06/01 20:30:03
The constructor can't be in chrome/common because
Peter Kasting
2011/06/01 21:05:52
Then we should move AutocompleteMatch to chrome/co
|
| + std::string provider_name; |
| + int relevance; |
| + bool deletable; |
| + string16 fill_into_edit; |
| + size_t inline_autocomplete_offset; |
| + GURL destination_url; |
| + string16 contents; |
| + string16 description; |
| + bool is_history_what_you_typed_match; |
| + std::string type; |
| + bool starred; |
| +}; |
| + |
| namespace IPC { |
| template <> |
| @@ -357,6 +377,14 @@ |
| static void Log(const param_type& p, std::string* l); |
| }; |
| +template <> |
| +struct ParamTraits<AutocompleteMatchData> { |
| + typedef AutocompleteMatchData param_type; |
| + static void Write(Message* m, const param_type& p); |
| + static bool Read(const Message* m, void** iter, param_type* r); |
| + static void Log(const param_type& p, std::string* l); |
| +}; |
| + |
| } // namespace IPC |
| #endif // CHROME_COMMON_AUTOMATION_MESSAGES_H__ |