| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_COMMON_RENDER_MESSAGES_H_ | 5 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_ |
| 6 #define CHROME_COMMON_RENDER_MESSAGES_H_ | 6 #define CHROME_COMMON_RENDER_MESSAGES_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 std::vector<int> pages; | 406 std::vector<int> pages; |
| 407 }; | 407 }; |
| 408 | 408 |
| 409 struct ViewMsg_DatabaseOpenFileResponse_Params { | 409 struct ViewMsg_DatabaseOpenFileResponse_Params { |
| 410 IPC::PlatformFileForTransit file_handle; // DB file handle | 410 IPC::PlatformFileForTransit file_handle; // DB file handle |
| 411 #if defined(OS_POSIX) | 411 #if defined(OS_POSIX) |
| 412 base::FileDescriptor dir_handle; // DB directory handle | 412 base::FileDescriptor dir_handle; // DB directory handle |
| 413 #endif | 413 #endif |
| 414 }; | 414 }; |
| 415 | 415 |
| 416 struct ViewMsg_OpenFileForPluginResponse_Params { | |
| 417 // Note: if we end up having to add a directory handle, this should be | |
| 418 // combined with the DatabaseOpenFileResponse_Params struct. | |
| 419 IPC::PlatformFileForTransit file_handle; | |
| 420 }; | |
| 421 | |
| 422 // Parameters to describe a rendered page. | 416 // Parameters to describe a rendered page. |
| 423 struct ViewHostMsg_DidPrintPage_Params { | 417 struct ViewHostMsg_DidPrintPage_Params { |
| 424 // A shared memory handle to the EMF data. This data can be quite large so a | 418 // A shared memory handle to the EMF data. This data can be quite large so a |
| 425 // memory map needs to be used. | 419 // memory map needs to be used. |
| 426 base::SharedMemoryHandle metafile_data_handle; | 420 base::SharedMemoryHandle metafile_data_handle; |
| 427 | 421 |
| 428 // Size of the metafile data. | 422 // Size of the metafile data. |
| 429 unsigned data_size; | 423 unsigned data_size; |
| 430 | 424 |
| 431 // Cookie for the document to ensure correctness. | 425 // Cookie for the document to ensure correctness. |
| (...skipping 1430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1862 LogParam(p.file_handle, l); | 1856 LogParam(p.file_handle, l); |
| 1863 #if defined(OS_POSIX) | 1857 #if defined(OS_POSIX) |
| 1864 l->append(L", "); | 1858 l->append(L", "); |
| 1865 LogParam(p.dir_handle, l); | 1859 LogParam(p.dir_handle, l); |
| 1866 #endif | 1860 #endif |
| 1867 l->append(L")"); | 1861 l->append(L")"); |
| 1868 } | 1862 } |
| 1869 }; | 1863 }; |
| 1870 | 1864 |
| 1871 template <> | 1865 template <> |
| 1872 struct ParamTraits<ViewMsg_OpenFileForPluginResponse_Params> { | |
| 1873 typedef ViewMsg_OpenFileForPluginResponse_Params param_type; | |
| 1874 static void Write(Message* m, const param_type& p) { | |
| 1875 WriteParam(m, p.file_handle); | |
| 1876 } | |
| 1877 static bool Read(const Message* m, void** iter, param_type* p) { | |
| 1878 return ReadParam(m, iter, &p->file_handle); | |
| 1879 } | |
| 1880 static void Log(const param_type& p, std::wstring* l) { | |
| 1881 LogParam(p.file_handle, l); | |
| 1882 } | |
| 1883 }; | |
| 1884 | |
| 1885 template <> | |
| 1886 struct ParamTraits<appcache::Status> { | 1866 struct ParamTraits<appcache::Status> { |
| 1887 typedef appcache::Status param_type; | 1867 typedef appcache::Status param_type; |
| 1888 static void Write(Message* m, const param_type& p) { | 1868 static void Write(Message* m, const param_type& p) { |
| 1889 m->WriteInt(static_cast<int>(p)); | 1869 m->WriteInt(static_cast<int>(p)); |
| 1890 } | 1870 } |
| 1891 static bool Read(const Message* m, void** iter, param_type* p) { | 1871 static bool Read(const Message* m, void** iter, param_type* p) { |
| 1892 int type; | 1872 int type; |
| 1893 if (!m->ReadInt(iter, &type)) | 1873 if (!m->ReadInt(iter, &type)) |
| 1894 return false; | 1874 return false; |
| 1895 *p = static_cast<param_type>(type); | 1875 *p = static_cast<param_type>(type); |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2306 } | 2286 } |
| 2307 }; | 2287 }; |
| 2308 | 2288 |
| 2309 } // namespace IPC | 2289 } // namespace IPC |
| 2310 | 2290 |
| 2311 | 2291 |
| 2312 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" | 2292 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" |
| 2313 #include "ipc/ipc_message_macros.h" | 2293 #include "ipc/ipc_message_macros.h" |
| 2314 | 2294 |
| 2315 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ | 2295 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ |
| OLD | NEW |