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

Unified Diff: chrome/common/render_messages_internal.h

Issue 225009: Implementing chrome.i18n.getMessage call, that loads message from the extensi... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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_internal.h
===================================================================
--- chrome/common/render_messages_internal.h (revision 27238)
+++ chrome/common/render_messages_internal.h (working copy)
@@ -6,6 +6,7 @@
// header guard.
// See ipc_message_macros.h for explanation of the macros and passes.
+#include <map>
#include <string>
#include <vector>
@@ -39,6 +40,11 @@
// TODO(mpcomplete): rename ViewMsg and ViewHostMsg to something that makes
// more sense with our current design.
+// IPC_MESSAGE macros choke on extra , in the std::map, when expanding. We need
+// to typedef it to avoid that.
+// Substitution map for l10n messages.
+typedef std::map<std::string, std::string> SubstitutionMap;
+
//-----------------------------------------------------------------------------
// RenderView messages
// These are messages sent from the browser to the renderer process.
@@ -653,6 +659,12 @@
std::string /* extension_id */,
std::vector<std::string> /* page_action_ids */)
+ // Tell the renderer process all known localized messages for a particular
+ // extension.
+ IPC_MESSAGE_CONTROL2(ViewMsg_Extension_SetL10nMessages,
+ std::string /* extension_id */,
+ SubstitutionMap /* l10n messages */)
+
// Changes the text direction of the currently selected input field (if any).
IPC_MESSAGE_ROUTED1(ViewMsg_SetTextDirection,
WebKit::WebTextDirection /* direction */)

Powered by Google App Engine
This is Rietveld 408576698