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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/render_messages_params.h
diff --git a/chrome/common/render_messages_params.h b/chrome/common/render_messages_params.h
index 1bd451646ca816300ab315d13c18060f406d44f0..68e3f96d23574ab94d3d33116f57e3455202ac72 100644
--- a/chrome/common/render_messages_params.h
+++ b/chrome/common/render_messages_params.h
@@ -835,25 +835,24 @@ struct ViewHostMsg_RunFileChooser_Params {
string16 accept_types;
};
-struct ViewMsg_ExtensionRendererInfo {
- ViewMsg_ExtensionRendererInfo();
- ~ViewMsg_ExtensionRendererInfo();
+struct ViewMsg_ExtensionLoaded_Params {
+ ViewMsg_ExtensionLoaded_Params();
+ explicit ViewMsg_ExtensionLoaded_Params(
+ 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
+ explicit ViewMsg_ExtensionLoaded_Params(const Extension* extension);
Elliot Glaysher 2011/01/24 19:00:28 dtor
Aaron Boodman 2011/01/25 00:27:33 Done.
- std::string id;
- ExtensionExtent web_extent;
- std::string name;
- GURL icon_url;
- Extension::Location location;
- bool allowed_to_execute_script_everywhere;
- std::vector<URLPattern> host_permissions;
-};
+ // Creates a new extension from the data in this object.
+ scoped_refptr<Extension> ConvertToExtension() const;
+
+ // The subset of the extension manifest data we send to renderers.
+ scoped_ptr<DictionaryValue> manifest;
-struct ViewMsg_ExtensionsUpdated_Params {
- ViewMsg_ExtensionsUpdated_Params();
- ~ViewMsg_ExtensionsUpdated_Params();
+ // The location the extension was installed from.
+ Extension::Location location;
- // Describes the installed extension apps and the URLs they cover.
- std::vector<ViewMsg_ExtensionRendererInfo> extensions;
+ // The path the extension was loaded from. This is used in the renderer only
+ // to generate the extension ID for extensions that are loaded unpacked.
+ FilePath path;
};
struct ViewMsg_DeviceOrientationUpdated_Params {
@@ -1111,16 +1110,8 @@ struct ParamTraits<ViewHostMsg_RunFileChooser_Params> {
};
template <>
-struct ParamTraits<ViewMsg_ExtensionRendererInfo> {
- typedef ViewMsg_ExtensionRendererInfo param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* p);
- static void Log(const param_type& p, std::string* l);
-};
-
-template <>
-struct ParamTraits<ViewMsg_ExtensionsUpdated_Params> {
- typedef ViewMsg_ExtensionsUpdated_Params param_type;
+struct ParamTraits<ViewMsg_ExtensionLoaded_Params> {
+ typedef ViewMsg_ExtensionLoaded_Params param_type;
static void Write(Message* m, const param_type& p);
static bool Read(const Message* m, void** iter, param_type* p);
static void Log(const param_type& p, std::string* l);

Powered by Google App Engine
This is Rietveld 408576698