diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-23 20:17:09 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-23 20:17:09 +0000 |
commit | fac6bb62034ed21e9a475f44f20c8f7d8121c5da (patch) | |
tree | 3273541c9c9f7c6f5780be7c846e7172a992bae9 /content | |
parent | 4747caf2e94287e3bc0974a619cbb5b03c799de3 (diff) | |
download | chromium_src-fac6bb62034ed21e9a475f44f20c8f7d8121c5da.zip chromium_src-fac6bb62034ed21e9a475f44f20c8f7d8121c5da.tar.gz chromium_src-fac6bb62034ed21e9a475f44f20c8f7d8121c5da.tar.bz2 |
Make all_messages.h include the generator files.
Review URL: http://codereview.chromium.org/6727011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79171 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/common/content_message_generator.h | 1 | ||||
-rw-r--r-- | content/common/pepper_file_messages.cc | 23 | ||||
-rw-r--r-- | content/common/pepper_file_messages.h | 22 |
3 files changed, 10 insertions, 36 deletions
diff --git a/content/common/content_message_generator.h b/content/common/content_message_generator.h index b784020..3aea66c 100644 --- a/content/common/content_message_generator.h +++ b/content/common/content_message_generator.h @@ -20,6 +20,7 @@ #include "content/common/indexed_db_messages.h" #include "content/common/mime_registry_messages.h" #include "content/common/p2p_messages.h" +#include "content/common/pepper_file_messages.h" #include "content/common/plugin_messages.h" #include "content/common/resource_messages.h" #include "content/common/speech_input_messages.h" diff --git a/content/common/pepper_file_messages.cc b/content/common/pepper_file_messages.cc index f84ba89..7986c62 100644 --- a/content/common/pepper_file_messages.cc +++ b/content/common/pepper_file_messages.cc @@ -2,33 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#define IPC_MESSAGE_IMPL #include "content/common/pepper_file_messages.h" namespace IPC { -void ParamTraits<webkit::ppapi::DirEntry>::Write(Message* m, - const param_type& p) { - WriteParam(m, p.name); - WriteParam(m, p.is_dir); -} - -bool ParamTraits<webkit::ppapi::DirEntry>::Read(const Message* m, - void** iter, - param_type* p) { - return ReadParam(m, iter, &p->name) && - ReadParam(m, iter, &p->is_dir); -} - -void ParamTraits<webkit::ppapi::DirEntry>::Log(const param_type& p, - std::string* l) { - l->append("("); - LogParam(p.name, l); - l->append(", "); - LogParam(p.is_dir, l); - l->append(")"); -} - void ParamTraits<webkit::ppapi::PepperFilePath>::Write(Message* m, const param_type& p) { WriteParam(m, static_cast<unsigned>(p.domain())); diff --git a/content/common/pepper_file_messages.h b/content/common/pepper_file_messages.h index 2825623..1bcafa1 100644 --- a/content/common/pepper_file_messages.h +++ b/content/common/pepper_file_messages.h @@ -10,21 +10,12 @@ #include "webkit/plugins/ppapi/dir_contents.h" #include "webkit/plugins/ppapi/file_path.h" -// Singly-included section, still not converted -#ifndef CHROME_COMMON_PEPPER_FILE_MESSAGES_H_ -#define CHROME_COMMON_PEPPER_FILE_MESSAGES_H_ +// Singly-included section since need custom serialization. +#ifndef CONTENT_COMMON_PEPPER_FILE_MESSAGES_H_ +#define CONTENT_COMMON_PEPPER_FILE_MESSAGES_H_ namespace IPC { -// Also needed for Serializing DirContents, which is just a vector of DirEntry. -template <> -struct ParamTraits<webkit::ppapi::DirEntry> { - typedef webkit::ppapi::DirEntry param_type; - static void Write(Message* m, const param_type& p); - static bool Read(const Message* m, void** iter, param_type* p); - static void Log(const param_type& p, std::string* l); -}; - template <> struct ParamTraits<webkit::ppapi::PepperFilePath> { typedef webkit::ppapi::PepperFilePath param_type; @@ -35,10 +26,15 @@ struct ParamTraits<webkit::ppapi::PepperFilePath> { } // namespace IPC -#endif // CHROME_COMMON_PEPPER_FILE_MESSAGES_H_ +#endif // CONTENT_COMMON_PEPPER_FILE_MESSAGES_H_ #define IPC_MESSAGE_START PepperFileMsgStart +IPC_STRUCT_TRAITS_BEGIN(webkit::ppapi::DirEntry) + IPC_STRUCT_TRAITS_MEMBER(name) + IPC_STRUCT_TRAITS_MEMBER(is_dir) +IPC_STRUCT_TRAITS_END() + // Trusted Pepper Filesystem messages from the renderer to the browser. // Open the file. |