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

Side by Side Diff: chrome/common/webkit_param_traits.cc

Issue 6713084: Move the rest of the renderer->browser messages that belong in content. Also do a bunch of cleanup: (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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
« no previous file with comments | « chrome/common/webkit_param_traits.h ('k') | chrome/renderer/print_web_view_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/common/webkit_param_traits.h"
6
7 #include "base/format_macros.h"
8
9 namespace IPC {
10
11 void ParamTraits<WebKit::WebCache::ResourceTypeStat>::Log(
12 const param_type& p, std::string* l) {
13 l->append(base::StringPrintf("%" PRIuS " %" PRIuS " %" PRIuS " %" PRIuS,
14 p.count, p.size, p.liveSize, p.decodedSize));
15 }
16
17 void ParamTraits<WebKit::WebTextCheckingResult>::Write(Message* m,
18 const param_type& p) {
19 WriteParam(m, static_cast<int>(p.error));
20 WriteParam(m, p.position);
21 WriteParam(m, p.length);
22 }
23
24 bool ParamTraits<WebKit::WebTextCheckingResult>::Read(const Message* m,
25 void** iter,
26 param_type* p) {
27 int error = 0;
28 if (!ReadParam(m, iter, &error))
29 return false;
30 if (error != WebKit::WebTextCheckingResult::ErrorSpelling &&
31 error != WebKit::WebTextCheckingResult::ErrorGrammar)
32 return false;
33 int position = 0;
34 if (!ReadParam(m, iter, &position))
35 return false;
36 int length = 0;
37 if (!ReadParam(m, iter, &length))
38 return false;
39
40 *p = WebKit::WebTextCheckingResult(
41 static_cast<WebKit::WebTextCheckingResult::Error>(error),
42 position,
43 length);
44 return true;
45 }
46
47 void ParamTraits<WebKit::WebTextCheckingResult>::Log(const param_type& p,
48 std::string* l) {
49 l->append("(");
50 LogParam(static_cast<int>(p.error), l);
51 l->append(", ");
52 LogParam(p.position, l);
53 l->append(", ");
54 LogParam(p.length, l);
55 l->append(")");
56 }
57
58 } // namespace IPC
OLDNEW
« no previous file with comments | « chrome/common/webkit_param_traits.h ('k') | chrome/renderer/print_web_view_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698