| 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> |
| 11 | 11 |
| 12 #include "app/surface/transport_dib.h" | 12 #include "app/surface/transport_dib.h" |
| 13 #include "base/file_path.h" | 13 #include "base/file_path.h" |
| 14 #include "base/ref_counted.h" | 14 #include "base/ref_counted.h" |
| 15 #include "base/shared_memory.h" | 15 #include "base/shared_memory.h" |
| 16 #include "base/time.h" | 16 #include "base/time.h" |
| 17 #include "base/values.h" | 17 #include "base/values.h" |
| 18 #include "chrome/common/extensions/extension.h" | 18 #include "chrome/common/extensions/extension.h" |
| 19 #include "chrome/common/extensions/extension_extent.h" | 19 #include "chrome/common/extensions/extension_extent.h" |
| 20 #include "chrome/common/extensions/url_pattern.h" | 20 #include "chrome/common/extensions/url_pattern.h" |
| 21 #include "chrome/common/window_container_type.h" | 21 #include "chrome/common/window_container_type.h" |
| 22 #include "content/common/navigation_gesture.h" | 22 #include "content/common/navigation_gesture.h" |
| 23 #include "content/common/navigation_types.h" | 23 #include "content/common/navigation_types.h" |
| 24 #include "content/common/page_transition_types.h" | 24 #include "content/common/page_transition_types.h" |
| 25 #include "content/common/renderer_preferences.h" | 25 #include "content/common/renderer_preferences.h" |
| 26 #include "content/common/serialized_script_value.h" | 26 #include "content/common/serialized_script_value.h" |
| 27 #include "googleurl/src/gurl.h" | 27 #include "googleurl/src/gurl.h" |
| 28 #include "ipc/ipc_param_traits.h" | 28 #include "ipc/ipc_param_traits.h" |
| 29 #include "media/audio/audio_parameters.h" | |
| 30 #include "net/base/host_port_pair.h" | 29 #include "net/base/host_port_pair.h" |
| 31 #include "ui/gfx/rect.h" | 30 #include "ui/gfx/rect.h" |
| 32 #include "ui/gfx/size.h" | 31 #include "ui/gfx/size.h" |
| 33 #include "webkit/glue/password_form.h" | 32 #include "webkit/glue/password_form.h" |
| 34 #include "webkit/glue/webaccessibility.h" | 33 #include "webkit/glue/webaccessibility.h" |
| 35 #include "webkit/glue/webmenuitem.h" | 34 #include "webkit/glue/webmenuitem.h" |
| 36 #include "webkit/glue/webpreferences.h" | 35 #include "webkit/glue/webpreferences.h" |
| 37 #include "webkit/plugins/npapi/webplugin.h" | 36 #include "webkit/plugins/npapi/webplugin.h" |
| 38 | 37 |
| 39 // TODO(erg): Split this file into $1_db_params.h, $1_audio_params.h, | 38 // TODO(erg): Split this file into $1_db_params.h, $1_audio_params.h, |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 // Type of navigation. | 102 // Type of navigation. |
| 104 NavigationType navigation_type; | 103 NavigationType navigation_type; |
| 105 | 104 |
| 106 // The time the request was created | 105 // The time the request was created |
| 107 base::Time request_time; | 106 base::Time request_time; |
| 108 | 107 |
| 109 // Extra headers (separated by \n) to send during the request. | 108 // Extra headers (separated by \n) to send during the request. |
| 110 std::string extra_headers; | 109 std::string extra_headers; |
| 111 }; | 110 }; |
| 112 | 111 |
| 113 // Current status of the audio output stream in the browser process. Browser | |
| 114 // sends information about the current playback state and error to the | |
| 115 // renderer process using this type. | |
| 116 struct ViewMsg_AudioStreamState_Params { | |
| 117 enum State { | |
| 118 kPlaying, | |
| 119 kPaused, | |
| 120 kError | |
| 121 }; | |
| 122 | |
| 123 ViewMsg_AudioStreamState_Params() | |
| 124 : state(kPlaying) { | |
| 125 } | |
| 126 | |
| 127 explicit ViewMsg_AudioStreamState_Params(State s) | |
| 128 : state(s) { | |
| 129 } | |
| 130 | |
| 131 // Carries the current playback state. | |
| 132 State state; | |
| 133 }; | |
| 134 | |
| 135 // The user has completed a find-in-page; this type defines what actions the | 112 // The user has completed a find-in-page; this type defines what actions the |
| 136 // renderer should take next. | 113 // renderer should take next. |
| 137 struct ViewMsg_StopFinding_Params { | 114 struct ViewMsg_StopFinding_Params { |
| 138 enum Action { | 115 enum Action { |
| 139 kClearSelection, | 116 kClearSelection, |
| 140 kKeepSelection, | 117 kKeepSelection, |
| 141 kActivateSelection | 118 kActivateSelection |
| 142 }; | 119 }; |
| 143 | 120 |
| 144 ViewMsg_StopFinding_Params() | 121 ViewMsg_StopFinding_Params() |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 // The size of the page the page author specified. | 515 // The size of the page the page author specified. |
| 539 gfx::Size page_size; | 516 gfx::Size page_size; |
| 540 | 517 |
| 541 // The printable area the page author specified. | 518 // The printable area the page author specified. |
| 542 gfx::Rect content_area; | 519 gfx::Rect content_area; |
| 543 | 520 |
| 544 // True if the page has visible overlays. | 521 // True if the page has visible overlays. |
| 545 bool has_visible_overlays; | 522 bool has_visible_overlays; |
| 546 }; | 523 }; |
| 547 | 524 |
| 548 // Parameters for creating an audio output stream. | |
| 549 struct ViewHostMsg_Audio_CreateStream_Params { | |
| 550 ViewHostMsg_Audio_CreateStream_Params(); | |
| 551 ~ViewHostMsg_Audio_CreateStream_Params(); | |
| 552 | |
| 553 // Parameters for the new audio stream. | |
| 554 // If |samples_per_packet| is set 0, the audio packet size is selected | |
| 555 // automatically by the browser process. | |
| 556 AudioParameters params; | |
| 557 }; | |
| 558 | |
| 559 // This message is used for supporting popup menus on Mac OS X using native | 525 // This message is used for supporting popup menus on Mac OS X using native |
| 560 // Cocoa controls. The renderer sends us this message which we use to populate | 526 // Cocoa controls. The renderer sends us this message which we use to populate |
| 561 // the popup menu. | 527 // the popup menu. |
| 562 struct ViewHostMsg_ShowPopup_Params { | 528 struct ViewHostMsg_ShowPopup_Params { |
| 563 ViewHostMsg_ShowPopup_Params(); | 529 ViewHostMsg_ShowPopup_Params(); |
| 564 ~ViewHostMsg_ShowPopup_Params(); | 530 ~ViewHostMsg_ShowPopup_Params(); |
| 565 | 531 |
| 566 // Position on the screen. | 532 // Position on the screen. |
| 567 gfx::Rect bounds; | 533 gfx::Rect bounds; |
| 568 | 534 |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 859 // Traits for ViewMsg_Navigate_Params structure to pack/unpack. | 825 // Traits for ViewMsg_Navigate_Params structure to pack/unpack. |
| 860 template <> | 826 template <> |
| 861 struct ParamTraits<ViewMsg_Navigate_Params> { | 827 struct ParamTraits<ViewMsg_Navigate_Params> { |
| 862 typedef ViewMsg_Navigate_Params param_type; | 828 typedef ViewMsg_Navigate_Params param_type; |
| 863 static void Write(Message* m, const param_type& p); | 829 static void Write(Message* m, const param_type& p); |
| 864 static bool Read(const Message* m, void** iter, param_type* p); | 830 static bool Read(const Message* m, void** iter, param_type* p); |
| 865 static void Log(const param_type& p, std::string* l); | 831 static void Log(const param_type& p, std::string* l); |
| 866 }; | 832 }; |
| 867 | 833 |
| 868 template <> | 834 template <> |
| 869 struct ParamTraits<ViewMsg_AudioStreamState_Params> { | |
| 870 typedef ViewMsg_AudioStreamState_Params param_type; | |
| 871 static void Write(Message* m, const param_type& p); | |
| 872 static bool Read(const Message* m, void** iter, param_type* p); | |
| 873 static void Log(const param_type& p, std::string* l); | |
| 874 }; | |
| 875 | |
| 876 template <> | |
| 877 struct ParamTraits<ViewMsg_StopFinding_Params> { | 835 struct ParamTraits<ViewMsg_StopFinding_Params> { |
| 878 typedef ViewMsg_StopFinding_Params param_type; | 836 typedef ViewMsg_StopFinding_Params param_type; |
| 879 static void Write(Message* m, const param_type& p); | 837 static void Write(Message* m, const param_type& p); |
| 880 static bool Read(const Message* m, void** iter, param_type* p); | 838 static bool Read(const Message* m, void** iter, param_type* p); |
| 881 static void Log(const param_type& p, std::string* l); | 839 static void Log(const param_type& p, std::string* l); |
| 882 }; | 840 }; |
| 883 | 841 |
| 884 template <> | 842 template <> |
| 885 struct ParamTraits<ViewHostMsg_PageHasOSDD_Type> { | 843 struct ParamTraits<ViewHostMsg_PageHasOSDD_Type> { |
| 886 typedef ViewHostMsg_PageHasOSDD_Type param_type; | 844 typedef ViewHostMsg_PageHasOSDD_Type param_type; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 955 | 913 |
| 956 template <> | 914 template <> |
| 957 struct ParamTraits<ViewHostMsg_DidPrintPage_Params> { | 915 struct ParamTraits<ViewHostMsg_DidPrintPage_Params> { |
| 958 typedef ViewHostMsg_DidPrintPage_Params param_type; | 916 typedef ViewHostMsg_DidPrintPage_Params param_type; |
| 959 static void Write(Message* m, const param_type& p); | 917 static void Write(Message* m, const param_type& p); |
| 960 static bool Read(const Message* m, void** iter, param_type* p); | 918 static bool Read(const Message* m, void** iter, param_type* p); |
| 961 static void Log(const param_type& p, std::string* l); | 919 static void Log(const param_type& p, std::string* l); |
| 962 }; | 920 }; |
| 963 | 921 |
| 964 template <> | 922 template <> |
| 965 struct ParamTraits<ViewHostMsg_Audio_CreateStream_Params> { | |
| 966 typedef ViewHostMsg_Audio_CreateStream_Params param_type; | |
| 967 static void Write(Message* m, const param_type& p); | |
| 968 static bool Read(const Message* m, void** iter, param_type* p); | |
| 969 static void Log(const param_type& p, std::string* l); | |
| 970 }; | |
| 971 | |
| 972 template <> | |
| 973 struct ParamTraits<ViewHostMsg_ShowPopup_Params> { | 923 struct ParamTraits<ViewHostMsg_ShowPopup_Params> { |
| 974 typedef ViewHostMsg_ShowPopup_Params param_type; | 924 typedef ViewHostMsg_ShowPopup_Params param_type; |
| 975 static void Write(Message* m, const param_type& p); | 925 static void Write(Message* m, const param_type& p); |
| 976 static bool Read(const Message* m, void** iter, param_type* p); | 926 static bool Read(const Message* m, void** iter, param_type* p); |
| 977 static void Log(const param_type& p, std::string* l); | 927 static void Log(const param_type& p, std::string* l); |
| 978 }; | 928 }; |
| 979 | 929 |
| 980 template <> | 930 template <> |
| 981 struct ParamTraits<ViewHostMsg_ScriptedPrint_Params> { | 931 struct ParamTraits<ViewHostMsg_ScriptedPrint_Params> { |
| 982 typedef ViewHostMsg_ScriptedPrint_Params param_type; | 932 typedef ViewHostMsg_ScriptedPrint_Params param_type; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1061 struct ParamTraits<ViewHostMsg_MalwareDOMDetails_Node> { | 1011 struct ParamTraits<ViewHostMsg_MalwareDOMDetails_Node> { |
| 1062 typedef ViewHostMsg_MalwareDOMDetails_Node param_type; | 1012 typedef ViewHostMsg_MalwareDOMDetails_Node param_type; |
| 1063 static void Write(Message* m, const param_type& p); | 1013 static void Write(Message* m, const param_type& p); |
| 1064 static bool Read(const Message* m, void** iter, param_type* p); | 1014 static bool Read(const Message* m, void** iter, param_type* p); |
| 1065 static void Log(const param_type& p, std::string* l); | 1015 static void Log(const param_type& p, std::string* l); |
| 1066 }; | 1016 }; |
| 1067 | 1017 |
| 1068 } // namespace IPC | 1018 } // namespace IPC |
| 1069 | 1019 |
| 1070 #endif // CHROME_COMMON_RENDER_MESSAGES_PARAMS_H_ | 1020 #endif // CHROME_COMMON_RENDER_MESSAGES_PARAMS_H_ |
| OLD | NEW |