Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(710)

Unified Diff: ppapi/proxy/pepper_file_messages.cc

Issue 10387195: Open pepper files directly in browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ppapi/proxy/pepper_file_messages.cc
===================================================================
--- ppapi/proxy/pepper_file_messages.cc (revision 140403)
+++ ppapi/proxy/pepper_file_messages.cc (working copy)
@@ -2,33 +2,62 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "content/common/pepper_file_messages.h"
+// Get basic type definitions.
+#define IPC_MESSAGE_IMPL
+#include "ppapi/proxy/pepper_file_messages.h"
+
+// Generate constructors.
+#include "ipc/struct_constructor_macros.h"
+#include "ppapi/proxy/pepper_file_messages.h"
+
+// Generate destructors.
+#include "ipc/struct_destructor_macros.h"
+#include "ppapi/proxy/pepper_file_messages.h"
+
+// Generate param traits write methods.
+#include "ipc/param_traits_write_macros.h"
namespace IPC {
+#include "ppapi/proxy/pepper_file_messages.h"
+} // namespace IPC
-void ParamTraits<webkit::ppapi::PepperFilePath>::Write(Message* m,
- const param_type& p) {
+// Generate param traits read methods.
+#include "ipc/param_traits_read_macros.h"
+namespace IPC {
+#include "ppapi/proxy/pepper_file_messages.h"
+} // namespace IPC
+
+// Generate param traits log methods.
+#include "ipc/param_traits_log_macros.h"
+namespace IPC {
+#include "ppapi/proxy/pepper_file_messages.h"
+} // namespace IPC
+
+namespace IPC {
+
+void ParamTraits<ppapi::PepperFilePath>::Write(Message* m,
+ const param_type& p) {
WriteParam(m, static_cast<unsigned>(p.domain()));
WriteParam(m, p.path());
}
-bool ParamTraits<webkit::ppapi::PepperFilePath>::Read(const Message* m,
- PickleIterator* iter,
- param_type* p) {
+bool ParamTraits<ppapi::PepperFilePath>::Read(const Message* m,
+ PickleIterator* iter,
+ param_type* p) {
unsigned domain;
FilePath path;
if (!ReadParam(m, iter, &domain) || !ReadParam(m, iter, &path))
return false;
- if (domain > webkit::ppapi::PepperFilePath::DOMAIN_MAX_VALID)
+ if (domain > ppapi::PepperFilePath::DOMAIN_MAX_VALID)
return false;
- *p = webkit::ppapi::PepperFilePath(
- static_cast<webkit::ppapi::PepperFilePath::Domain>(domain), path);
+ *p = ppapi::PepperFilePath(
+ static_cast<ppapi::PepperFilePath::Domain>(domain), path);
return true;
}
-void ParamTraits<webkit::ppapi::PepperFilePath>::Log(const param_type& p,
- std::string* l) {
+void ParamTraits<ppapi::PepperFilePath>::Log(const param_type& p,
+ std::string* l) {
l->append("(");
LogParam(static_cast<unsigned>(p.domain()), l);
l->append(", ");

Powered by Google App Engine
This is Rietveld 408576698