| OLD | NEW |
| 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 #include "chrome/common/common_param_traits.h" | 5 #include "chrome/common/common_param_traits.h" |
| 6 | 6 |
| 7 #include "base/time.h" | 7 #include "base/time.h" |
| 8 #include "chrome/common/chrome_constants.h" | 8 #include "chrome/common/chrome_constants.h" |
| 9 #include "chrome/common/content_settings.h" | 9 #include "chrome/common/content_settings.h" |
| 10 #include "chrome/common/geoposition.h" | 10 #include "chrome/common/geoposition.h" |
| 11 #include "chrome/common/thumbnail_score.h" | 11 #include "chrome/common/thumbnail_score.h" |
| 12 #include "chrome/common/web_apps.h" | 12 #include "chrome/common/web_apps.h" |
| 13 #include "googleurl/src/gurl.h" | 13 #include "googleurl/src/gurl.h" |
| 14 #include "net/base/host_port_pair.h" |
| 14 #include "net/base/upload_data.h" | 15 #include "net/base/upload_data.h" |
| 15 #include "printing/backend/print_backend.h" | 16 #include "printing/backend/print_backend.h" |
| 16 #include "printing/native_metafile.h" | 17 #include "printing/native_metafile.h" |
| 17 #include "printing/page_range.h" | 18 #include "printing/page_range.h" |
| 18 #include "ui/gfx/rect.h" | 19 #include "ui/gfx/rect.h" |
| 19 | 20 |
| 20 #ifndef EXCLUDE_SKIA_DEPENDENCIES | 21 #ifndef EXCLUDE_SKIA_DEPENDENCIES |
| 21 #include "third_party/skia/include/core/SkBitmap.h" | 22 #include "third_party/skia/include/core/SkBitmap.h" |
| 22 #endif | 23 #endif |
| 23 #include "webkit/glue/password_form.h" | 24 #include "webkit/glue/password_form.h" |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 } | 284 } |
| 284 | 285 |
| 285 return true; | 286 return true; |
| 286 } | 287 } |
| 287 | 288 |
| 288 void ParamTraits<WebApplicationInfo>::Log(const WebApplicationInfo& p, | 289 void ParamTraits<WebApplicationInfo>::Log(const WebApplicationInfo& p, |
| 289 std::string* l) { | 290 std::string* l) { |
| 290 l->append("<WebApplicationInfo>"); | 291 l->append("<WebApplicationInfo>"); |
| 291 } | 292 } |
| 292 | 293 |
| 294 void ParamTraits<net::HostPortPair>::Write(Message* m, const param_type& p) { |
| 295 WriteParam(m, p.host()); |
| 296 WriteParam(m, p.port()); |
| 297 } |
| 298 |
| 299 bool ParamTraits<net::HostPortPair>::Read(const Message* m, void** iter, |
| 300 param_type* r) { |
| 301 std::string host; |
| 302 uint16 port; |
| 303 if (!ReadParam(m, iter, &host) || !ReadParam(m, iter, &port)) |
| 304 return false; |
| 305 |
| 306 r->set_host(host); |
| 307 r->set_port(port); |
| 308 return true; |
| 309 } |
| 310 |
| 311 void ParamTraits<net::HostPortPair>::Log(const param_type& p, std::string* l) { |
| 312 l->append(p.ToString()); |
| 313 } |
| 314 |
| 293 void ParamTraits<net::URLRequestStatus>::Write(Message* m, | 315 void ParamTraits<net::URLRequestStatus>::Write(Message* m, |
| 294 const param_type& p) { | 316 const param_type& p) { |
| 295 WriteParam(m, static_cast<int>(p.status())); | 317 WriteParam(m, static_cast<int>(p.status())); |
| 296 WriteParam(m, p.os_error()); | 318 WriteParam(m, p.os_error()); |
| 297 } | 319 } |
| 298 | 320 |
| 299 bool ParamTraits<net::URLRequestStatus>::Read(const Message* m, void** iter, | 321 bool ParamTraits<net::URLRequestStatus>::Read(const Message* m, void** iter, |
| 300 param_type* r) { | 322 param_type* r) { |
| 301 int status, os_error; | 323 int status, os_error; |
| 302 if (!ReadParam(m, iter, &status) || | 324 if (!ReadParam(m, iter, &status) || |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 714 l->append(","); | 736 l->append(","); |
| 715 LogParam(p.caps_mime_type, l); | 737 LogParam(p.caps_mime_type, l); |
| 716 l->append(","); | 738 l->append(","); |
| 717 LogParam(p.printer_defaults, l); | 739 LogParam(p.printer_defaults, l); |
| 718 l->append(","); | 740 l->append(","); |
| 719 LogParam(p.defaults_mime_type, l); | 741 LogParam(p.defaults_mime_type, l); |
| 720 l->append(")"); | 742 l->append(")"); |
| 721 } | 743 } |
| 722 | 744 |
| 723 } // namespace IPC | 745 } // namespace IPC |
| OLD | NEW |