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

Side by Side Diff: ppapi/proxy/resource_message_params.h

Issue 1097393007: Update {virtual,override} to follow C++11 style in ppapi. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Split off one file into separate review. Created 5 years, 8 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 | « ppapi/proxy/resource_creation_proxy.h ('k') | ppapi/proxy/resource_message_test_sink.h » ('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 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // const reference. We need to change all the callers and make it not mutable. 132 // const reference. We need to change all the callers and make it not mutable.
133 mutable scoped_refptr<SerializedHandles> handles_; 133 mutable scoped_refptr<SerializedHandles> handles_;
134 }; 134 };
135 135
136 // Parameters common to all ResourceMessage "Call" requests. 136 // Parameters common to all ResourceMessage "Call" requests.
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 ~ResourceMessageCallParams() override;
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 void Serialize(IPC::Message* msg) const override;
148 virtual bool Deserialize(const IPC::Message* msg, 148 bool Deserialize(const IPC::Message* msg, PickleIterator* iter) override;
149 PickleIterator* iter) override;
150 149
151 private: 150 private:
152 bool has_callback_; 151 bool has_callback_;
153 }; 152 };
154 153
155 // Parameters common to all ResourceMessage "Reply" requests. 154 // Parameters common to all ResourceMessage "Reply" requests.
156 class PPAPI_PROXY_EXPORT ResourceMessageReplyParams 155 class PPAPI_PROXY_EXPORT ResourceMessageReplyParams
157 : public ResourceMessageParams { 156 : public ResourceMessageParams {
158 public: 157 public:
159 ResourceMessageReplyParams(); 158 ResourceMessageReplyParams();
160 ResourceMessageReplyParams(PP_Resource resource, int32_t sequence); 159 ResourceMessageReplyParams(PP_Resource resource, int32_t sequence);
161 virtual ~ResourceMessageReplyParams(); 160 ~ResourceMessageReplyParams() override;
162 161
163 void set_result(int32_t r) { result_ = r; } 162 void set_result(int32_t r) { result_ = r; }
164 int32_t result() const { return result_; } 163 int32_t result() const { return result_; }
165 164
166 virtual void Serialize(IPC::Message* msg) const override; 165 void Serialize(IPC::Message* msg) const override;
167 virtual bool Deserialize(const IPC::Message* msg, 166 bool Deserialize(const IPC::Message* msg, PickleIterator* iter) override;
168 PickleIterator* iter) override;
169 167
170 // Writes everything except the handles to |msg|. 168 // Writes everything except the handles to |msg|.
171 void WriteReplyHeader(IPC::Message* msg) const; 169 void WriteReplyHeader(IPC::Message* msg) const;
172 170
173 private: 171 private:
174 // Pepper "result code" for the callback. 172 // Pepper "result code" for the callback.
175 int32_t result_; 173 int32_t result_;
176 }; 174 };
177 175
178 } // namespace proxy 176 } // namespace proxy
(...skipping 23 matching lines...) Expand all
202 static bool Read(const Message* m, PickleIterator* iter, param_type* r) { 200 static bool Read(const Message* m, PickleIterator* iter, param_type* r) {
203 return r->Deserialize(m, iter); 201 return r->Deserialize(m, iter);
204 } 202 }
205 static void Log(const param_type& p, std::string* l) { 203 static void Log(const param_type& p, std::string* l) {
206 } 204 }
207 }; 205 };
208 206
209 } // namespace IPC 207 } // namespace IPC
210 208
211 #endif // PPAPI_PROXY_RESOURCE_MESSAGE_PARAMS_H_ 209 #endif // PPAPI_PROXY_RESOURCE_MESSAGE_PARAMS_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/resource_creation_proxy.h ('k') | ppapi/proxy/resource_message_test_sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698