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

Side by Side Diff: content/public/common/webkit_param_traits.h

Issue 9368052: Removed WebTextCheckingResult legacy API use. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Elimianted ParamTrais<WebString>. Created 8 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // This file is used to define IPC::ParamTraits<> specializations for a number 5 // This file is used to define IPC::ParamTraits<> specializations for a number
6 // of WebKit types so that they can be serialized over IPC. IPC::ParamTraits<> 6 // of WebKit types so that they can be serialized over IPC. IPC::ParamTraits<>
7 // specializations for basic types (like int and std::string) and types in the 7 // specializations for basic types (like int and std::string) and types in the
8 // 'base' project can be found in ipc/ipc_message_utils.h. This file contains 8 // 'base' project can be found in ipc/ipc_message_utils.h. This file contains
9 // specializations for types that are used by the content code, and which need 9 // specializations for types that are used by the content code, and which need
10 // manual serialization code. This is usually because they're not structs with 10 // manual serialization code. This is usually because they're not structs with
11 // public members. 11 // public members.
12 12
13 #ifndef CONTENT_PUBLIC_COMMON_WEBKIT_PARAM_TRAITS_H_ 13 #ifndef CONTENT_PUBLIC_COMMON_WEBKIT_PARAM_TRAITS_H_
14 #define CONTENT_PUBLIC_COMMON_WEBKIT_PARAM_TRAITS_H_ 14 #define CONTENT_PUBLIC_COMMON_WEBKIT_PARAM_TRAITS_H_
15 #pragma once 15 #pragma once
16 16
17 #include <string> 17 #include <string>
18 18
19 #include "base/memory/ref_counted.h" 19 #include "base/memory/ref_counted.h"
20 #include "content/common/content_export.h" 20 #include "content/common/content_export.h"
21 #include "ipc/ipc_message_utils.h" 21 #include "ipc/ipc_message_utils.h"
22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" 22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextCheckingResult .h"
23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" 24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h"
24 #include "webkit/blob/blob_data.h" 25 #include "webkit/blob/blob_data.h"
25 #include "webkit/glue/npruntime_util.h" 26 #include "webkit/glue/npruntime_util.h"
26 #include "webkit/glue/resource_type.h" 27 #include "webkit/glue/resource_type.h"
27 #include "webkit/glue/webcursor.h" 28 #include "webkit/glue/webcursor.h"
28 #include "webkit/glue/window_open_disposition.h" 29 #include "webkit/glue/window_open_disposition.h"
29 #include "webkit/plugins/webplugininfo.h" 30 #include "webkit/plugins/webplugininfo.h"
30 31
31 namespace webkit { 32 namespace webkit {
32 namespace forms { 33 namespace forms {
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 LogParam(p->size, l); 226 LogParam(p->size, l);
226 l->append(", "); 227 l->append(", ");
227 LogParam(p->type, l); 228 LogParam(p->type, l);
228 l->append(", "); 229 l->append(", ");
229 LogParam(p->timeStampSeconds, l); 230 LogParam(p->timeStampSeconds, l);
230 l->append(")"); 231 l->append(")");
231 } 232 }
232 }; 233 };
233 234
234 template <> 235 template <>
236 struct SimilarTypeTraits<WebKit::WebTextCheckingType> {
237 typedef int Type;
238 };
239
240 template <>
241 struct CONTENT_EXPORT ParamTraits<WebKit::WebTextCheckingResult> {
242 typedef WebKit::WebTextCheckingResult param_type;
243 static void Write(Message* m, const param_type& p);
244 static bool Read(const Message* m, void** iter, param_type* p);
245 static void Log(const param_type& p, std::string* l);
246 };
247
248 template <>
235 struct SimilarTypeTraits<WebKit::WebTextDirection> { 249 struct SimilarTypeTraits<WebKit::WebTextDirection> {
236 typedef int Type; 250 typedef int Type;
237 }; 251 };
238 252
239 template <> 253 template <>
240 struct SimilarTypeTraits<WindowOpenDisposition> { 254 struct SimilarTypeTraits<WindowOpenDisposition> {
241 typedef int Type; 255 typedef int Type;
242 }; 256 };
243 257
244 template <> 258 template <>
245 struct CONTENT_EXPORT ParamTraits<webkit::forms::PasswordForm> { 259 struct CONTENT_EXPORT ParamTraits<webkit::forms::PasswordForm> {
246 typedef webkit::forms::PasswordForm param_type; 260 typedef webkit::forms::PasswordForm param_type;
247 static void Write(Message* m, const param_type& p); 261 static void Write(Message* m, const param_type& p);
248 static bool Read(const Message* m, void** iter, param_type* p); 262 static bool Read(const Message* m, void** iter, param_type* p);
249 static void Log(const param_type& p, std::string* l); 263 static void Log(const param_type& p, std::string* l);
250 }; 264 };
251 265
252 } // namespace IPC 266 } // namespace IPC
253 267
254 #endif // CONTENT_PUBLIC_COMMON_WEBKIT_PARAM_TRAITS_H_ 268 #endif // CONTENT_PUBLIC_COMMON_WEBKIT_PARAM_TRAITS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698