OLD | NEW |
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 PPAPI_PROXY_RESOURCE_MESSAGE_PARAMS_H_ | 5 #ifndef PPAPI_PROXY_RESOURCE_MESSAGE_PARAMS_H_ |
6 #define PPAPI_PROXY_RESOURCE_MESSAGE_PARAMS_H_ | 6 #define PPAPI_PROXY_RESOURCE_MESSAGE_PARAMS_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 class PPAPI_PROXY_EXPORT ResourceMessageCallParams | 137 class PPAPI_PROXY_EXPORT ResourceMessageCallParams |
138 : public ResourceMessageParams { | 138 : public ResourceMessageParams { |
139 public: | 139 public: |
140 ResourceMessageCallParams(); | 140 ResourceMessageCallParams(); |
141 ResourceMessageCallParams(PP_Resource resource, int32_t sequence); | 141 ResourceMessageCallParams(PP_Resource resource, int32_t sequence); |
142 virtual ~ResourceMessageCallParams(); | 142 virtual ~ResourceMessageCallParams(); |
143 | 143 |
144 void set_has_callback() { has_callback_ = true; } | 144 void set_has_callback() { has_callback_ = true; } |
145 bool has_callback() const { return has_callback_; } | 145 bool has_callback() const { return has_callback_; } |
146 | 146 |
147 virtual void Serialize(IPC::Message* msg) const OVERRIDE; | 147 virtual void Serialize(IPC::Message* msg) const override; |
148 virtual bool Deserialize(const IPC::Message* msg, | 148 virtual bool Deserialize(const IPC::Message* msg, |
149 PickleIterator* iter) OVERRIDE; | 149 PickleIterator* iter) override; |
150 | 150 |
151 private: | 151 private: |
152 bool has_callback_; | 152 bool has_callback_; |
153 }; | 153 }; |
154 | 154 |
155 // Parameters common to all ResourceMessage "Reply" requests. | 155 // Parameters common to all ResourceMessage "Reply" requests. |
156 class PPAPI_PROXY_EXPORT ResourceMessageReplyParams | 156 class PPAPI_PROXY_EXPORT ResourceMessageReplyParams |
157 : public ResourceMessageParams { | 157 : public ResourceMessageParams { |
158 public: | 158 public: |
159 ResourceMessageReplyParams(); | 159 ResourceMessageReplyParams(); |
160 ResourceMessageReplyParams(PP_Resource resource, int32_t sequence); | 160 ResourceMessageReplyParams(PP_Resource resource, int32_t sequence); |
161 virtual ~ResourceMessageReplyParams(); | 161 virtual ~ResourceMessageReplyParams(); |
162 | 162 |
163 void set_result(int32_t r) { result_ = r; } | 163 void set_result(int32_t r) { result_ = r; } |
164 int32_t result() const { return result_; } | 164 int32_t result() const { return result_; } |
165 | 165 |
166 virtual void Serialize(IPC::Message* msg) const OVERRIDE; | 166 virtual void Serialize(IPC::Message* msg) const override; |
167 virtual bool Deserialize(const IPC::Message* msg, | 167 virtual bool Deserialize(const IPC::Message* msg, |
168 PickleIterator* iter) OVERRIDE; | 168 PickleIterator* iter) override; |
169 | 169 |
170 // Writes everything except the handles to |msg|. | 170 // Writes everything except the handles to |msg|. |
171 void WriteReplyHeader(IPC::Message* msg) const; | 171 void WriteReplyHeader(IPC::Message* msg) const; |
172 | 172 |
173 private: | 173 private: |
174 // Pepper "result code" for the callback. | 174 // Pepper "result code" for the callback. |
175 int32_t result_; | 175 int32_t result_; |
176 }; | 176 }; |
177 | 177 |
178 } // namespace proxy | 178 } // namespace proxy |
(...skipping 23 matching lines...) Expand all Loading... |
202 static bool Read(const Message* m, PickleIterator* iter, param_type* r) { | 202 static bool Read(const Message* m, PickleIterator* iter, param_type* r) { |
203 return r->Deserialize(m, iter); | 203 return r->Deserialize(m, iter); |
204 } | 204 } |
205 static void Log(const param_type& p, std::string* l) { | 205 static void Log(const param_type& p, std::string* l) { |
206 } | 206 } |
207 }; | 207 }; |
208 | 208 |
209 } // namespace IPC | 209 } // namespace IPC |
210 | 210 |
211 #endif // PPAPI_PROXY_RESOURCE_MESSAGE_PARAMS_H_ | 211 #endif // PPAPI_PROXY_RESOURCE_MESSAGE_PARAMS_H_ |
OLD | NEW |