| 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 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 828 string16 title; | 828 string16 title; |
| 829 | 829 |
| 830 // Default file name to select in the dialog. | 830 // Default file name to select in the dialog. |
| 831 FilePath default_file_name; | 831 FilePath default_file_name; |
| 832 | 832 |
| 833 // A comma-separated MIME types such as "audio/*,text/plain", that is used | 833 // A comma-separated MIME types such as "audio/*,text/plain", that is used |
| 834 // to restrict selectable files to such types. | 834 // to restrict selectable files to such types. |
| 835 string16 accept_types; | 835 string16 accept_types; |
| 836 }; | 836 }; |
| 837 | 837 |
| 838 struct ViewMsg_ExtensionRendererInfo { | 838 struct ViewMsg_ExtensionLoaded_Params { |
| 839 ViewMsg_ExtensionRendererInfo(); | 839 ViewMsg_ExtensionLoaded_Params(); |
| 840 ~ViewMsg_ExtensionRendererInfo(); | 840 ~ViewMsg_ExtensionLoaded_Params(); |
| 841 explicit ViewMsg_ExtensionLoaded_Params(const Extension* extension); |
| 841 | 842 |
| 843 // A copy constructor is needed because this structure can end up getting |
| 844 // copied inside the IPC machinery on gcc <= 4.2. |
| 845 ViewMsg_ExtensionLoaded_Params( |
| 846 const ViewMsg_ExtensionLoaded_Params& other); |
| 847 |
| 848 // Creates a new extension from the data in this object. |
| 849 scoped_refptr<Extension> ConvertToExtension() const; |
| 850 |
| 851 // The subset of the extension manifest data we send to renderers. |
| 852 scoped_ptr<DictionaryValue> manifest; |
| 853 |
| 854 // The location the extension was installed from. |
| 855 Extension::Location location; |
| 856 |
| 857 // The path the extension was loaded from. This is used in the renderer only |
| 858 // to generate the extension ID for extensions that are loaded unpacked. |
| 859 FilePath path; |
| 860 |
| 861 // We keep this separate so that it can be used in logging. |
| 842 std::string id; | 862 std::string id; |
| 843 ExtensionExtent web_extent; | |
| 844 std::string name; | |
| 845 GURL icon_url; | |
| 846 Extension::Location location; | |
| 847 bool allowed_to_execute_script_everywhere; | |
| 848 std::vector<URLPattern> host_permissions; | |
| 849 }; | |
| 850 | |
| 851 struct ViewMsg_ExtensionsUpdated_Params { | |
| 852 ViewMsg_ExtensionsUpdated_Params(); | |
| 853 ~ViewMsg_ExtensionsUpdated_Params(); | |
| 854 | |
| 855 // Describes the installed extension apps and the URLs they cover. | |
| 856 std::vector<ViewMsg_ExtensionRendererInfo> extensions; | |
| 857 }; | 863 }; |
| 858 | 864 |
| 859 struct ViewMsg_DeviceOrientationUpdated_Params { | 865 struct ViewMsg_DeviceOrientationUpdated_Params { |
| 860 ViewMsg_DeviceOrientationUpdated_Params(); | 866 ViewMsg_DeviceOrientationUpdated_Params(); |
| 861 ~ViewMsg_DeviceOrientationUpdated_Params(); | 867 ~ViewMsg_DeviceOrientationUpdated_Params(); |
| 862 | 868 |
| 863 // These fields have the same meaning as in device_orientation::Orientation. | 869 // These fields have the same meaning as in device_orientation::Orientation. |
| 864 bool can_provide_alpha; | 870 bool can_provide_alpha; |
| 865 double alpha; | 871 double alpha; |
| 866 bool can_provide_beta; | 872 bool can_provide_beta; |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1104 | 1110 |
| 1105 template<> | 1111 template<> |
| 1106 struct ParamTraits<ViewHostMsg_RunFileChooser_Params> { | 1112 struct ParamTraits<ViewHostMsg_RunFileChooser_Params> { |
| 1107 typedef ViewHostMsg_RunFileChooser_Params param_type; | 1113 typedef ViewHostMsg_RunFileChooser_Params param_type; |
| 1108 static void Write(Message* m, const param_type& p); | 1114 static void Write(Message* m, const param_type& p); |
| 1109 static bool Read(const Message* m, void** iter, param_type* p); | 1115 static bool Read(const Message* m, void** iter, param_type* p); |
| 1110 static void Log(const param_type& p, std::string* l); | 1116 static void Log(const param_type& p, std::string* l); |
| 1111 }; | 1117 }; |
| 1112 | 1118 |
| 1113 template <> | 1119 template <> |
| 1114 struct ParamTraits<ViewMsg_ExtensionRendererInfo> { | 1120 struct ParamTraits<ViewMsg_ExtensionLoaded_Params> { |
| 1115 typedef ViewMsg_ExtensionRendererInfo param_type; | 1121 typedef ViewMsg_ExtensionLoaded_Params param_type; |
| 1116 static void Write(Message* m, const param_type& p); | 1122 static void Write(Message* m, const param_type& p); |
| 1117 static bool Read(const Message* m, void** iter, param_type* p); | 1123 static bool Read(const Message* m, void** iter, param_type* p); |
| 1118 static void Log(const param_type& p, std::string* l); | 1124 static void Log(const param_type& p, std::string* l); |
| 1119 }; | |
| 1120 | |
| 1121 template <> | |
| 1122 struct ParamTraits<ViewMsg_ExtensionsUpdated_Params> { | |
| 1123 typedef ViewMsg_ExtensionsUpdated_Params param_type; | |
| 1124 static void Write(Message* m, const param_type& p); | |
| 1125 static bool Read(const Message* m, void** iter, param_type* p); | |
| 1126 static void Log(const param_type& p, std::string* l); | |
| 1127 }; | 1125 }; |
| 1128 | 1126 |
| 1129 template <> | 1127 template <> |
| 1130 struct ParamTraits<ViewMsg_DeviceOrientationUpdated_Params> { | 1128 struct ParamTraits<ViewMsg_DeviceOrientationUpdated_Params> { |
| 1131 typedef ViewMsg_DeviceOrientationUpdated_Params param_type; | 1129 typedef ViewMsg_DeviceOrientationUpdated_Params param_type; |
| 1132 static void Write(Message* m, const param_type& p); | 1130 static void Write(Message* m, const param_type& p); |
| 1133 static bool Read(const Message* m, void** iter, param_type* p); | 1131 static bool Read(const Message* m, void** iter, param_type* p); |
| 1134 static void Log(const param_type& p, std::string* l); | 1132 static void Log(const param_type& p, std::string* l); |
| 1135 }; | 1133 }; |
| 1136 | 1134 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1154 struct ParamTraits<ViewHostMsg_AccessibilityNotification_Params> { | 1152 struct ParamTraits<ViewHostMsg_AccessibilityNotification_Params> { |
| 1155 typedef ViewHostMsg_AccessibilityNotification_Params param_type; | 1153 typedef ViewHostMsg_AccessibilityNotification_Params param_type; |
| 1156 static void Write(Message* m, const param_type& p); | 1154 static void Write(Message* m, const param_type& p); |
| 1157 static bool Read(const Message* m, void** iter, param_type* p); | 1155 static bool Read(const Message* m, void** iter, param_type* p); |
| 1158 static void Log(const param_type& p, std::string* l); | 1156 static void Log(const param_type& p, std::string* l); |
| 1159 }; | 1157 }; |
| 1160 | 1158 |
| 1161 } // namespace IPC | 1159 } // namespace IPC |
| 1162 | 1160 |
| 1163 #endif // CHROME_COMMON_RENDER_MESSAGES_PARAMS_H_ | 1161 #endif // CHROME_COMMON_RENDER_MESSAGES_PARAMS_H_ |
| OLD | NEW |