| 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 #ifndef CHROME_COMMON_RENDER_MESSAGES_PARAMS_H_ | 5 #ifndef CHROME_COMMON_RENDER_MESSAGES_PARAMS_H_ |
| 6 #define CHROME_COMMON_RENDER_MESSAGES_PARAMS_H_ | 6 #define CHROME_COMMON_RENDER_MESSAGES_PARAMS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "chrome/common/serialized_script_value.h" | 26 #include "chrome/common/serialized_script_value.h" |
| 27 #include "chrome/common/window_container_type.h" | 27 #include "chrome/common/window_container_type.h" |
| 28 #include "googleurl/src/gurl.h" | 28 #include "googleurl/src/gurl.h" |
| 29 #include "ipc/ipc_param_traits.h" | 29 #include "ipc/ipc_param_traits.h" |
| 30 #include "media/audio/audio_parameters.h" | 30 #include "media/audio/audio_parameters.h" |
| 31 #include "net/base/host_port_pair.h" | 31 #include "net/base/host_port_pair.h" |
| 32 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" | 32 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" |
| 33 #include "ui/gfx/rect.h" | 33 #include "ui/gfx/rect.h" |
| 34 #include "ui/gfx/size.h" | 34 #include "ui/gfx/size.h" |
| 35 #include "webkit/glue/password_form.h" | 35 #include "webkit/glue/password_form.h" |
| 36 #include "webkit/glue/resource_type.h" | |
| 37 #include "webkit/glue/webaccessibility.h" | 36 #include "webkit/glue/webaccessibility.h" |
| 38 #include "webkit/glue/webmenuitem.h" | 37 #include "webkit/glue/webmenuitem.h" |
| 39 #include "webkit/glue/webpreferences.h" | 38 #include "webkit/glue/webpreferences.h" |
| 40 #include "webkit/plugins/npapi/webplugin.h" | 39 #include "webkit/plugins/npapi/webplugin.h" |
| 41 | 40 |
| 42 // TODO(erg): Split this file into $1_db_params.h, $1_audio_params.h, | 41 // TODO(erg): Split this file into $1_db_params.h, $1_audio_params.h, |
| 43 // $1_print_params.h and $1_render_params.h. | 42 // $1_print_params.h and $1_render_params.h. |
| 44 | 43 |
| 45 namespace net { | 44 namespace net { |
| 46 class UploadData; | 45 class UploadData; |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 int new_render_process_host_id; | 420 int new_render_process_host_id; |
| 422 | 421 |
| 423 // The identifier of the *request* the new view made that is causing the | 422 // The identifier of the *request* the new view made that is causing the |
| 424 // cross-site transition. This is *not* a route_id, but the request that we | 423 // cross-site transition. This is *not* a route_id, but the request that we |
| 425 // will resume once the ACK from the closing view has been received. This | 424 // will resume once the ACK from the closing view has been received. This |
| 426 // must be valid when for_cross_site_transition is set, and must be -1 | 425 // must be valid when for_cross_site_transition is set, and must be -1 |
| 427 // otherwise. | 426 // otherwise. |
| 428 int new_request_id; | 427 int new_request_id; |
| 429 }; | 428 }; |
| 430 | 429 |
| 431 // Parameters for a resource request. | |
| 432 struct ViewHostMsg_Resource_Request { | |
| 433 ViewHostMsg_Resource_Request(); | |
| 434 ~ViewHostMsg_Resource_Request(); | |
| 435 | |
| 436 // The request method: GET, POST, etc. | |
| 437 std::string method; | |
| 438 | |
| 439 // The requested URL. | |
| 440 GURL url; | |
| 441 | |
| 442 // Usually the URL of the document in the top-level window, which may be | |
| 443 // checked by the third-party cookie blocking policy. Leaving it empty may | |
| 444 // lead to undesired cookie blocking. Third-party cookie blocking can be | |
| 445 // bypassed by setting first_party_for_cookies = url, but this should ideally | |
| 446 // only be done if there really is no way to determine the correct value. | |
| 447 GURL first_party_for_cookies; | |
| 448 | |
| 449 // The referrer to use (may be empty). | |
| 450 GURL referrer; | |
| 451 | |
| 452 // Additional HTTP request headers. | |
| 453 std::string headers; | |
| 454 | |
| 455 // net::URLRequest load flags (0 by default). | |
| 456 int load_flags; | |
| 457 | |
| 458 // Process ID from which this request originated, or zero if it originated | |
| 459 // in the renderer itself. | |
| 460 int origin_pid; | |
| 461 | |
| 462 // What this resource load is for (main frame, sub-frame, sub-resource, | |
| 463 // object). | |
| 464 ResourceType::Type resource_type; | |
| 465 | |
| 466 // Used by plugin->browser requests to get the correct net::URLRequestContext. | |
| 467 uint32 request_context; | |
| 468 | |
| 469 // Indicates which frame (or worker context) the request is being loaded into, | |
| 470 // or kNoHostId. | |
| 471 int appcache_host_id; | |
| 472 | |
| 473 // Optional upload data (may be null). | |
| 474 scoped_refptr<net::UploadData> upload_data; | |
| 475 | |
| 476 bool download_to_file; | |
| 477 | |
| 478 // True if the request was user initiated. | |
| 479 bool has_user_gesture; | |
| 480 | |
| 481 // The following two members are specified if the request is initiated by | |
| 482 // a plugin like Gears. | |
| 483 | |
| 484 // Contains the id of the host renderer. | |
| 485 int host_renderer_id; | |
| 486 | |
| 487 // Contains the id of the host render view. | |
| 488 int host_render_view_id; | |
| 489 }; | |
| 490 | |
| 491 // Parameters for a render request. | 430 // Parameters for a render request. |
| 492 struct ViewMsg_Print_Params { | 431 struct ViewMsg_Print_Params { |
| 493 ViewMsg_Print_Params(); | 432 ViewMsg_Print_Params(); |
| 494 ~ViewMsg_Print_Params(); | 433 ~ViewMsg_Print_Params(); |
| 495 | 434 |
| 496 // Physical size of the page, including non-printable margins, | 435 // Physical size of the page, including non-printable margins, |
| 497 // in pixels according to dpi. | 436 // in pixels according to dpi. |
| 498 gfx::Size page_size; | 437 gfx::Size page_size; |
| 499 | 438 |
| 500 // In pixels according to dpi_x and dpi_y. | 439 // In pixels according to dpi_x and dpi_y. |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1021 | 960 |
| 1022 template <> | 961 template <> |
| 1023 struct ParamTraits<ViewMsg_ClosePage_Params> { | 962 struct ParamTraits<ViewMsg_ClosePage_Params> { |
| 1024 typedef ViewMsg_ClosePage_Params param_type; | 963 typedef ViewMsg_ClosePage_Params param_type; |
| 1025 static void Write(Message* m, const param_type& p); | 964 static void Write(Message* m, const param_type& p); |
| 1026 static bool Read(const Message* m, void** iter, param_type* r); | 965 static bool Read(const Message* m, void** iter, param_type* r); |
| 1027 static void Log(const param_type& p, std::string* l); | 966 static void Log(const param_type& p, std::string* l); |
| 1028 }; | 967 }; |
| 1029 | 968 |
| 1030 template <> | 969 template <> |
| 1031 struct ParamTraits<ViewHostMsg_Resource_Request> { | |
| 1032 typedef ViewHostMsg_Resource_Request param_type; | |
| 1033 static void Write(Message* m, const param_type& p); | |
| 1034 static bool Read(const Message* m, void** iter, param_type* r); | |
| 1035 static void Log(const param_type& p, std::string* l); | |
| 1036 }; | |
| 1037 | |
| 1038 template <> | |
| 1039 struct ParamTraits<ViewMsg_Print_Params> { | 970 struct ParamTraits<ViewMsg_Print_Params> { |
| 1040 typedef ViewMsg_Print_Params param_type; | 971 typedef ViewMsg_Print_Params param_type; |
| 1041 static void Write(Message* m, const param_type& p); | 972 static void Write(Message* m, const param_type& p); |
| 1042 static bool Read(const Message* m, void** iter, param_type* p); | 973 static bool Read(const Message* m, void** iter, param_type* p); |
| 1043 static void Log(const param_type& p, std::string* l); | 974 static void Log(const param_type& p, std::string* l); |
| 1044 }; | 975 }; |
| 1045 | 976 |
| 1046 template <> | 977 template <> |
| 1047 struct ParamTraits<ViewMsg_PrintPage_Params> { | 978 struct ParamTraits<ViewMsg_PrintPage_Params> { |
| 1048 typedef ViewMsg_PrintPage_Params param_type; | 979 typedef ViewMsg_PrintPage_Params param_type; |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1199 struct ParamTraits<ViewHostMsg_MalwareDOMDetails_Node> { | 1130 struct ParamTraits<ViewHostMsg_MalwareDOMDetails_Node> { |
| 1200 typedef ViewHostMsg_MalwareDOMDetails_Node param_type; | 1131 typedef ViewHostMsg_MalwareDOMDetails_Node param_type; |
| 1201 static void Write(Message* m, const param_type& p); | 1132 static void Write(Message* m, const param_type& p); |
| 1202 static bool Read(const Message* m, void** iter, param_type* p); | 1133 static bool Read(const Message* m, void** iter, param_type* p); |
| 1203 static void Log(const param_type& p, std::string* l); | 1134 static void Log(const param_type& p, std::string* l); |
| 1204 }; | 1135 }; |
| 1205 | 1136 |
| 1206 } // namespace IPC | 1137 } // namespace IPC |
| 1207 | 1138 |
| 1208 #endif // CHROME_COMMON_RENDER_MESSAGES_PARAMS_H_ | 1139 #endif // CHROME_COMMON_RENDER_MESSAGES_PARAMS_H_ |
| OLD | NEW |