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

Side by Side Diff: ipc/ipc_message_utils.h

Issue 1320783002: Make SharedMemoryHandle a class on windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ipc_global
Patch Set: Rebase. Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « ipc/ipc_channel_win.cc ('k') | ipc/ipc_message_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 IPC_IPC_MESSAGE_UTILS_H_ 5 #ifndef IPC_IPC_MESSAGE_UTILS_H_
6 #define IPC_IPC_MESSAGE_UTILS_H_ 6 #define IPC_IPC_MESSAGE_UTILS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 class DictionaryValue; 55 class DictionaryValue;
56 class FilePath; 56 class FilePath;
57 class ListValue; 57 class ListValue;
58 class NullableString16; 58 class NullableString16;
59 class Time; 59 class Time;
60 class TimeDelta; 60 class TimeDelta;
61 class TimeTicks; 61 class TimeTicks;
62 class TraceTicks; 62 class TraceTicks;
63 struct FileDescriptor; 63 struct FileDescriptor;
64 64
65 #if defined(OS_MACOSX) && !defined(OS_IOS) 65 #if (defined(OS_MACOSX) && !defined(OS_IOS)) || defined(OS_WIN)
66 class SharedMemoryHandle; 66 class SharedMemoryHandle;
67 #endif // defined(OS_MACOSX) && !defined(OS_IOS) 67 #endif // (defined(OS_MACOSX) && !defined(OS_IOS)) || defined(OS_WIN)
68 } 68 }
69 69
70 namespace IPC { 70 namespace IPC {
71 71
72 struct ChannelHandle; 72 struct ChannelHandle;
73 73
74 // ----------------------------------------------------------------------------- 74 // -----------------------------------------------------------------------------
75 // How we send IPC message logs across channels. 75 // How we send IPC message logs across channels.
76 struct IPC_EXPORT LogData { 76 struct IPC_EXPORT LogData {
77 LogData(); 77 LogData();
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 struct IPC_EXPORT ParamTraits<base::FileDescriptor> { 477 struct IPC_EXPORT ParamTraits<base::FileDescriptor> {
478 typedef base::FileDescriptor param_type; 478 typedef base::FileDescriptor param_type;
479 static void Write(Message* m, const param_type& p); 479 static void Write(Message* m, const param_type& p);
480 static bool Read(const Message* m, 480 static bool Read(const Message* m,
481 base::PickleIterator* iter, 481 base::PickleIterator* iter,
482 param_type* r); 482 param_type* r);
483 static void Log(const param_type& p, std::string* l); 483 static void Log(const param_type& p, std::string* l);
484 }; 484 };
485 #endif // defined(OS_POSIX) 485 #endif // defined(OS_POSIX)
486 486
487 #if defined(OS_MACOSX) && !defined(OS_IOS) 487 #if (defined(OS_MACOSX) && !defined(OS_IOS)) || defined(OS_WIN)
488 template <> 488 template <>
489 struct IPC_EXPORT ParamTraits<base::SharedMemoryHandle> { 489 struct IPC_EXPORT ParamTraits<base::SharedMemoryHandle> {
490 typedef base::SharedMemoryHandle param_type; 490 typedef base::SharedMemoryHandle param_type;
491 static void Write(Message* m, const param_type& p); 491 static void Write(Message* m, const param_type& p);
492 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r); 492 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
493 static void Log(const param_type& p, std::string* l); 493 static void Log(const param_type& p, std::string* l);
494 }; 494 };
495 #endif 495 #endif // (defined(OS_MACOSX) && !defined(OS_IOS)) || defined(OS_WIN)
496 496
497 template <> 497 template <>
498 struct IPC_EXPORT ParamTraits<base::FilePath> { 498 struct IPC_EXPORT ParamTraits<base::FilePath> {
499 typedef base::FilePath param_type; 499 typedef base::FilePath param_type;
500 static void Write(Message* m, const param_type& p); 500 static void Write(Message* m, const param_type& p);
501 static bool Read(const Message* m, 501 static bool Read(const Message* m,
502 base::PickleIterator* iter, 502 base::PickleIterator* iter,
503 param_type* r); 503 param_type* r);
504 static void Log(const param_type& p, std::string* l); 504 static void Log(const param_type& p, std::string* l);
505 }; 505 };
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
1058 template <typename... Ts> 1058 template <typename... Ts>
1059 static void WriteReplyParams(Message* reply, Ts... args) { 1059 static void WriteReplyParams(Message* reply, Ts... args) {
1060 ReplyParam p(args...); 1060 ReplyParam p(args...);
1061 WriteParam(reply, p); 1061 WriteParam(reply, p);
1062 } 1062 }
1063 }; 1063 };
1064 1064
1065 } // namespace IPC 1065 } // namespace IPC
1066 1066
1067 #endif // IPC_IPC_MESSAGE_UTILS_H_ 1067 #endif // IPC_IPC_MESSAGE_UTILS_H_
OLDNEW
« no previous file with comments | « ipc/ipc_channel_win.cc ('k') | ipc/ipc_message_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698