| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-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 28 matching lines...) Expand all Loading... |
| 39 #include "webkit/glue/password_form_dom_manager.h" | 39 #include "webkit/glue/password_form_dom_manager.h" |
| 40 #include "webkit/glue/resource_loader_bridge.h" | 40 #include "webkit/glue/resource_loader_bridge.h" |
| 41 #include "webkit/glue/webaccessibility.h" | 41 #include "webkit/glue/webaccessibility.h" |
| 42 #include "webkit/glue/webdropdata.h" | 42 #include "webkit/glue/webdropdata.h" |
| 43 #include "webkit/glue/webmenuitem.h" | 43 #include "webkit/glue/webmenuitem.h" |
| 44 #include "webkit/glue/webplugin.h" | 44 #include "webkit/glue/webplugin.h" |
| 45 #include "webkit/glue/webplugininfo.h" | 45 #include "webkit/glue/webplugininfo.h" |
| 46 #include "webkit/glue/webpreferences.h" | 46 #include "webkit/glue/webpreferences.h" |
| 47 #include "webkit/glue/webview_delegate.h" | 47 #include "webkit/glue/webview_delegate.h" |
| 48 | 48 |
| 49 #if defined(OS_WIN) |
| 50 #include "base/platform_file.h" |
| 51 #endif |
| 52 |
| 49 #if defined(OS_POSIX) | 53 #if defined(OS_POSIX) |
| 54 #include "base/file_descriptor_posix.h" |
| 50 #include "third_party/skia/include/core/SkBitmap.h" | 55 #include "third_party/skia/include/core/SkBitmap.h" |
| 51 #endif | 56 #endif |
| 52 | 57 |
| 53 namespace base { | 58 namespace base { |
| 54 class Time; | 59 class Time; |
| 55 } | 60 } |
| 56 | 61 |
| 57 class SkBitmap; | 62 class SkBitmap; |
| 58 | 63 |
| 59 // Parameters structure for ViewMsg_Navigate, which has too many data | 64 // Parameters structure for ViewMsg_Navigate, which has too many data |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 | 385 |
| 381 struct ViewMsg_PrintPages_Params { | 386 struct ViewMsg_PrintPages_Params { |
| 382 // Parameters to render the page as a printed page. It must always be the same | 387 // Parameters to render the page as a printed page. It must always be the same |
| 383 // value for all the document. | 388 // value for all the document. |
| 384 ViewMsg_Print_Params params; | 389 ViewMsg_Print_Params params; |
| 385 | 390 |
| 386 // If empty, this means a request to render all the printed pages. | 391 // If empty, this means a request to render all the printed pages. |
| 387 std::vector<int> pages; | 392 std::vector<int> pages; |
| 388 }; | 393 }; |
| 389 | 394 |
| 395 struct ViewMsg_DatabaseOpenFileResponse_Params { |
| 396 #if defined(OS_WIN) |
| 397 base::PlatformFile file_handle; // DB file handle |
| 398 #elif defined(OS_POSIX) |
| 399 base::FileDescriptor file_handle; // DB file handle |
| 400 base::FileDescriptor dir_handle; // DB directory handle |
| 401 #endif |
| 402 }; |
| 403 |
| 390 // Parameters to describe a rendered page. | 404 // Parameters to describe a rendered page. |
| 391 struct ViewHostMsg_DidPrintPage_Params { | 405 struct ViewHostMsg_DidPrintPage_Params { |
| 392 // A shared memory handle to the EMF data. This data can be quite large so a | 406 // A shared memory handle to the EMF data. This data can be quite large so a |
| 393 // memory map needs to be used. | 407 // memory map needs to be used. |
| 394 base::SharedMemoryHandle metafile_data_handle; | 408 base::SharedMemoryHandle metafile_data_handle; |
| 395 | 409 |
| 396 // Size of the metafile data. | 410 // Size of the metafile data. |
| 397 unsigned data_size; | 411 unsigned data_size; |
| 398 | 412 |
| 399 // Cookie for the document to ensure correctness. | 413 // Cookie for the document to ensure correctness. |
| (...skipping 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1846 break; | 1860 break; |
| 1847 default: | 1861 default: |
| 1848 state = L"UNKNOWN"; | 1862 state = L"UNKNOWN"; |
| 1849 break; | 1863 break; |
| 1850 } | 1864 } |
| 1851 LogParam(state, l); | 1865 LogParam(state, l); |
| 1852 } | 1866 } |
| 1853 }; | 1867 }; |
| 1854 | 1868 |
| 1855 template <> | 1869 template <> |
| 1870 struct ParamTraits<ViewMsg_DatabaseOpenFileResponse_Params> { |
| 1871 typedef ViewMsg_DatabaseOpenFileResponse_Params param_type; |
| 1872 static void Write(Message* m, const param_type& p) { |
| 1873 WriteParam(m, p.file_handle); |
| 1874 #if defined(OS_POSIX) |
| 1875 WriteParam(m, p.dir_handle); |
| 1876 #endif |
| 1877 } |
| 1878 static bool Read(const Message* m, void** iter, param_type* p) { |
| 1879 return ReadParam(m, iter, &p->file_handle) |
| 1880 #if defined(OS_POSIX) |
| 1881 && ReadParam(m, iter, &p->dir_handle) |
| 1882 #endif |
| 1883 ; |
| 1884 } |
| 1885 static void Log(const param_type& p, std::wstring* l) { |
| 1886 l->append(L"("); |
| 1887 LogParam(p.file_handle, l); |
| 1888 #if defined(OS_POSIX) |
| 1889 l->append(L", "); |
| 1890 LogParam(p.dir_handle, l); |
| 1891 #endif |
| 1892 l->append(L")"); |
| 1893 } |
| 1894 }; |
| 1895 |
| 1896 template <> |
| 1856 struct ParamTraits<appcache::Status> { | 1897 struct ParamTraits<appcache::Status> { |
| 1857 typedef appcache::Status param_type; | 1898 typedef appcache::Status param_type; |
| 1858 static void Write(Message* m, const param_type& p) { | 1899 static void Write(Message* m, const param_type& p) { |
| 1859 m->WriteInt(static_cast<int>(p)); | 1900 m->WriteInt(static_cast<int>(p)); |
| 1860 } | 1901 } |
| 1861 static bool Read(const Message* m, void** iter, param_type* p) { | 1902 static bool Read(const Message* m, void** iter, param_type* p) { |
| 1862 int type; | 1903 int type; |
| 1863 if (!m->ReadInt(iter, &type)) | 1904 if (!m->ReadInt(iter, &type)) |
| 1864 return false; | 1905 return false; |
| 1865 *p = static_cast<param_type>(type); | 1906 *p = static_cast<param_type>(type); |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2123 } | 2164 } |
| 2124 }; | 2165 }; |
| 2125 | 2166 |
| 2126 } // namespace IPC | 2167 } // namespace IPC |
| 2127 | 2168 |
| 2128 | 2169 |
| 2129 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" | 2170 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" |
| 2130 #include "ipc/ipc_message_macros.h" | 2171 #include "ipc/ipc_message_macros.h" |
| 2131 | 2172 |
| 2132 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ | 2173 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ |
| OLD | NEW |