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

Unified Diff: ui/webui/resources/js/load_time_data.js

Issue 588363002: WebUI: Update some more uses of the old-style i18ntemplate/LocalStrings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 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
« no previous file with comments | « chrome/test/data/webui/webui_resource_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/webui/resources/js/load_time_data.js
diff --git a/ui/webui/resources/js/load_time_data.js b/ui/webui/resources/js/load_time_data.js
index d7f99e161a251e3df8eabe38cc7f9f63cadf6d16..8af272c14152445bb8144412045153a9eccbff3c 100644
--- a/ui/webui/resources/js/load_time_data.js
+++ b/ui/webui/resources/js/load_time_data.js
@@ -23,6 +23,11 @@ function LoadTimeData() {}
LoadTimeData.prototype = {
/**
* Sets the backing object.
+ *
+ * Note that there is no getter for |data_| to discourage abuse of the form:
+ *
+ * var value = loadTimeData.data()['key'];
+ *
* @param {Object} value The de-serialized page data.
*/
set data(value) {
@@ -31,6 +36,13 @@ function LoadTimeData() {}
},
/**
+ * Returns a JsEvalContext for |data_|.
Dan Beam 2014/09/23 05:30:39 @returns {JsEvalContext}
Evan Stade 2014/09/23 17:35:07 Done.
+ */
+ getJsEvalContext: function() {
Dan Beam 2014/09/23 05:30:39 nit: createJsEvalContext
Evan Stade 2014/09/23 17:35:07 Done.
+ return new JsEvalContext(this.data_);
+ },
+
+ /**
* @param {string} id An ID of a value that might exist.
* @return {boolean} True if |id| is a key in the dictionary.
*/
« no previous file with comments | « chrome/test/data/webui/webui_resource_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698