Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(977)

Side by Side Diff: chrome/common/render_messages_params.h

Issue 6242010: Refactor away most of ExtensionRendererInfo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove more deadness Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 explicit ViewMsg_ExtensionLoaded_Params(
841 const ViewMsg_ExtensionLoaded_Params& other);
Matt Perry 2011/01/24 20:08:34 when is this copy constructor used?
Aaron Boodman 2011/01/25 00:27:33 It is used when ViewMsg_ExtensionLoaded is instant
Matt Perry 2011/01/25 00:45:54 I see. In that case, maybe making a deep copy of t
842 explicit ViewMsg_ExtensionLoaded_Params(const Extension* extension);
841 843
Elliot Glaysher 2011/01/24 19:00:28 dtor
Aaron Boodman 2011/01/25 00:27:33 Done.
842 std::string id; 844 // Creates a new extension from the data in this object.
843 ExtensionExtent web_extent; 845 scoped_refptr<Extension> ConvertToExtension() const;
844 std::string name; 846
845 GURL icon_url; 847 // The subset of the extension manifest data we send to renderers.
848 scoped_ptr<DictionaryValue> manifest;
849
850 // The location the extension was installed from.
846 Extension::Location location; 851 Extension::Location location;
847 bool allowed_to_execute_script_everywhere;
848 std::vector<URLPattern> host_permissions;
849 };
850 852
851 struct ViewMsg_ExtensionsUpdated_Params { 853 // The path the extension was loaded from. This is used in the renderer only
852 ViewMsg_ExtensionsUpdated_Params(); 854 // to generate the extension ID for extensions that are loaded unpacked.
853 ~ViewMsg_ExtensionsUpdated_Params(); 855 FilePath path;
854
855 // Describes the installed extension apps and the URLs they cover.
856 std::vector<ViewMsg_ExtensionRendererInfo> extensions;
857 }; 856 };
858 857
859 struct ViewMsg_DeviceOrientationUpdated_Params { 858 struct ViewMsg_DeviceOrientationUpdated_Params {
860 ViewMsg_DeviceOrientationUpdated_Params(); 859 ViewMsg_DeviceOrientationUpdated_Params();
861 ~ViewMsg_DeviceOrientationUpdated_Params(); 860 ~ViewMsg_DeviceOrientationUpdated_Params();
862 861
863 // These fields have the same meaning as in device_orientation::Orientation. 862 // These fields have the same meaning as in device_orientation::Orientation.
864 bool can_provide_alpha; 863 bool can_provide_alpha;
865 double alpha; 864 double alpha;
866 bool can_provide_beta; 865 bool can_provide_beta;
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
1104 1103
1105 template<> 1104 template<>
1106 struct ParamTraits<ViewHostMsg_RunFileChooser_Params> { 1105 struct ParamTraits<ViewHostMsg_RunFileChooser_Params> {
1107 typedef ViewHostMsg_RunFileChooser_Params param_type; 1106 typedef ViewHostMsg_RunFileChooser_Params param_type;
1108 static void Write(Message* m, const param_type& p); 1107 static void Write(Message* m, const param_type& p);
1109 static bool Read(const Message* m, void** iter, param_type* p); 1108 static bool Read(const Message* m, void** iter, param_type* p);
1110 static void Log(const param_type& p, std::string* l); 1109 static void Log(const param_type& p, std::string* l);
1111 }; 1110 };
1112 1111
1113 template <> 1112 template <>
1114 struct ParamTraits<ViewMsg_ExtensionRendererInfo> { 1113 struct ParamTraits<ViewMsg_ExtensionLoaded_Params> {
1115 typedef ViewMsg_ExtensionRendererInfo param_type; 1114 typedef ViewMsg_ExtensionLoaded_Params param_type;
1116 static void Write(Message* m, const param_type& p); 1115 static void Write(Message* m, const param_type& p);
1117 static bool Read(const Message* m, void** iter, param_type* p); 1116 static bool Read(const Message* m, void** iter, param_type* p);
1118 static void Log(const param_type& p, std::string* l); 1117 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 }; 1118 };
1128 1119
1129 template <> 1120 template <>
1130 struct ParamTraits<ViewMsg_DeviceOrientationUpdated_Params> { 1121 struct ParamTraits<ViewMsg_DeviceOrientationUpdated_Params> {
1131 typedef ViewMsg_DeviceOrientationUpdated_Params param_type; 1122 typedef ViewMsg_DeviceOrientationUpdated_Params param_type;
1132 static void Write(Message* m, const param_type& p); 1123 static void Write(Message* m, const param_type& p);
1133 static bool Read(const Message* m, void** iter, param_type* p); 1124 static bool Read(const Message* m, void** iter, param_type* p);
1134 static void Log(const param_type& p, std::string* l); 1125 static void Log(const param_type& p, std::string* l);
1135 }; 1126 };
1136 1127
(...skipping 17 matching lines...) Expand all
1154 struct ParamTraits<ViewHostMsg_AccessibilityNotification_Params> { 1145 struct ParamTraits<ViewHostMsg_AccessibilityNotification_Params> {
1155 typedef ViewHostMsg_AccessibilityNotification_Params param_type; 1146 typedef ViewHostMsg_AccessibilityNotification_Params param_type;
1156 static void Write(Message* m, const param_type& p); 1147 static void Write(Message* m, const param_type& p);
1157 static bool Read(const Message* m, void** iter, param_type* p); 1148 static bool Read(const Message* m, void** iter, param_type* p);
1158 static void Log(const param_type& p, std::string* l); 1149 static void Log(const param_type& p, std::string* l);
1159 }; 1150 };
1160 1151
1161 } // namespace IPC 1152 } // namespace IPC
1162 1153
1163 #endif // CHROME_COMMON_RENDER_MESSAGES_PARAMS_H_ 1154 #endif // CHROME_COMMON_RENDER_MESSAGES_PARAMS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698