OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 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/render_messages_params.h" | 5 #include "chrome/common/render_messages_params.h" |
6 | 6 |
7 #include "chrome/common/navigation_gesture.h" | 7 #include "chrome/common/navigation_gesture.h" |
8 #include "chrome/common/common_param_traits.h" | 8 #include "chrome/common/common_param_traits.h" |
9 #include "chrome/common/indexed_db_param_traits.h" | 9 #include "chrome/common/indexed_db_param_traits.h" |
10 #include "chrome/common/render_messages.h" | 10 #include "chrome/common/render_messages.h" |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 | 295 |
296 ViewHostMsg_DomMessage_Params::ViewHostMsg_DomMessage_Params() | 296 ViewHostMsg_DomMessage_Params::ViewHostMsg_DomMessage_Params() |
297 : request_id(0), | 297 : request_id(0), |
298 has_callback(false), | 298 has_callback(false), |
299 user_gesture(false) { | 299 user_gesture(false) { |
300 } | 300 } |
301 | 301 |
302 ViewHostMsg_DomMessage_Params::~ViewHostMsg_DomMessage_Params() { | 302 ViewHostMsg_DomMessage_Params::~ViewHostMsg_DomMessage_Params() { |
303 } | 303 } |
304 | 304 |
305 ViewHostMsg_OpenFileSystemRequest_Params:: | |
306 ViewHostMsg_OpenFileSystemRequest_Params() | |
307 : routing_id(0), | |
308 request_id(0), | |
309 type(WebKit::WebFileSystem::TypeTemporary), | |
310 requested_size(0) { | |
311 } | |
312 | |
313 ViewHostMsg_OpenFileSystemRequest_Params:: | |
314 ~ViewHostMsg_OpenFileSystemRequest_Params() { | |
315 } | |
316 | |
317 namespace IPC { | 305 namespace IPC { |
318 | 306 |
319 // Self contained templates which are only used inside serializing Params | 307 // Self contained templates which are only used inside serializing Params |
320 // structs. | 308 // structs. |
321 template<> | 309 template<> |
322 struct ParamTraits<ViewMsg_Navigate_Params::NavigationType> { | 310 struct ParamTraits<ViewMsg_Navigate_Params::NavigationType> { |
323 typedef ViewMsg_Navigate_Params::NavigationType param_type; | 311 typedef ViewMsg_Navigate_Params::NavigationType param_type; |
324 static void Write(Message* m, const param_type& p) { | 312 static void Write(Message* m, const param_type& p) { |
325 m->WriteInt(p); | 313 m->WriteInt(p); |
326 } | 314 } |
(...skipping 1466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1793 LogParam(p.source_url, l); | 1781 LogParam(p.source_url, l); |
1794 l->append(", "); | 1782 l->append(", "); |
1795 LogParam(p.request_id, l); | 1783 LogParam(p.request_id, l); |
1796 l->append(", "); | 1784 l->append(", "); |
1797 LogParam(p.has_callback, l); | 1785 LogParam(p.has_callback, l); |
1798 l->append(", "); | 1786 l->append(", "); |
1799 LogParam(p.user_gesture, l); | 1787 LogParam(p.user_gesture, l); |
1800 l->append(")"); | 1788 l->append(")"); |
1801 } | 1789 } |
1802 | 1790 |
1803 void ParamTraits<ViewHostMsg_OpenFileSystemRequest_Params>::Write( | |
1804 Message* m, | |
1805 const param_type& p) { | |
1806 WriteParam(m, p.routing_id); | |
1807 WriteParam(m, p.request_id); | |
1808 WriteParam(m, p.origin_url); | |
1809 WriteParam(m, p.type); | |
1810 WriteParam(m, p.requested_size); | |
1811 } | |
1812 | |
1813 bool ParamTraits<ViewHostMsg_OpenFileSystemRequest_Params>::Read( | |
1814 const Message* m, | |
1815 void** iter, | |
1816 param_type* p) { | |
1817 return | |
1818 ReadParam(m, iter, &p->routing_id) && | |
1819 ReadParam(m, iter, &p->request_id) && | |
1820 ReadParam(m, iter, &p->origin_url) && | |
1821 ReadParam(m, iter, &p->type) && | |
1822 ReadParam(m, iter, &p->requested_size); | |
1823 } | |
1824 | |
1825 void ParamTraits<ViewHostMsg_OpenFileSystemRequest_Params>::Log( | |
1826 const param_type& p, | |
1827 std::string* l) { | |
1828 l->append("("); | |
1829 LogParam(p.routing_id, l); | |
1830 l->append(", "); | |
1831 LogParam(p.request_id, l); | |
1832 l->append(", "); | |
1833 LogParam(p.origin_url, l); | |
1834 l->append(", "); | |
1835 LogParam(p.type, l); | |
1836 l->append(", "); | |
1837 LogParam(p.requested_size, l); | |
1838 l->append(")"); | |
1839 } | |
1840 | |
1841 void ParamTraits<base::file_util_proxy::Entry>::Write( | 1791 void ParamTraits<base::file_util_proxy::Entry>::Write( |
1842 Message* m, | 1792 Message* m, |
1843 const param_type& p) { | 1793 const param_type& p) { |
1844 WriteParam(m, p.name); | 1794 WriteParam(m, p.name); |
1845 WriteParam(m, p.is_directory); | 1795 WriteParam(m, p.is_directory); |
1846 } | 1796 } |
1847 | 1797 |
1848 bool ParamTraits<base::file_util_proxy::Entry>::Read( | 1798 bool ParamTraits<base::file_util_proxy::Entry>::Read( |
1849 const Message* m, | 1799 const Message* m, |
1850 void** iter, | 1800 void** iter, |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1884 const param_type& p, | 1834 const param_type& p, |
1885 std::string* l) { | 1835 std::string* l) { |
1886 l->append("("); | 1836 l->append("("); |
1887 LogParam(p.notification_type, l); | 1837 LogParam(p.notification_type, l); |
1888 l->append(", "); | 1838 l->append(", "); |
1889 LogParam(p.acc_obj, l); | 1839 LogParam(p.acc_obj, l); |
1890 l->append(")"); | 1840 l->append(")"); |
1891 } | 1841 } |
1892 | 1842 |
1893 } // namespace IPC | 1843 } // namespace IPC |
OLD | NEW |