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

Unified Diff: content/browser/webui/web_ui_data_source_impl.h

Issue 1690773003: [Template expressions] expanding $i18n expressions on webui html (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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: content/browser/webui/web_ui_data_source_impl.h
diff --git a/content/browser/webui/web_ui_data_source_impl.h b/content/browser/webui/web_ui_data_source_impl.h
index b084ba54ea3121db0b4cd110fbe6ab28d0176082..1e3fa36d9d1fed6ef3e34f58d9185e392bd4f77e 100644
--- a/content/browser/webui/web_ui_data_source_impl.h
+++ b/content/browser/webui/web_ui_data_source_impl.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
Dan Beam 2016/02/11 02:12:32 for future reference: i wouldn't bother doing this
dschuyler 2016/02/11 02:22:29 Acknowledged.
+// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -17,6 +17,7 @@
#include "content/common/content_export.h"
#include "content/public/browser/url_data_source.h"
#include "content/public/browser/web_ui_data_source.h"
+#include "ui/base/template_expressions.h"
namespace content {
@@ -51,10 +52,6 @@ class CONTENT_EXPORT WebUIDataSourceImpl
void SendLocalizedStringsAsJSON(
const URLDataSource::GotDataCallback& callback);
- // Completes a request by sending the file specified by |idr|.
- void SendFromResourceBundle(
- const URLDataSource::GotDataCallback& callback, int idr);
-
private:
class InternalDataSource;
friend class InternalDataSource;
@@ -84,6 +81,10 @@ class CONTENT_EXPORT WebUIDataSourceImpl
int default_resource_;
std::string json_path_;
std::map<std::string, int> path_to_idr_map_;
+ // The |replacements_| is intended to replace |localized_strings_|.
+ // TODO(dschuyler) phase out |localized_strings_| in Q1 2016. (Or rename
+ // to |load_time_flags_| if the usage is reduced to storing flags only).
+ ui::TemplateReplacements replacements_;
base::DictionaryValue localized_strings_;
WebUIDataSource::HandleRequestCallback filter_callback_;
bool add_csp_;
@@ -98,6 +99,6 @@ class CONTENT_EXPORT WebUIDataSourceImpl
DISALLOW_COPY_AND_ASSIGN(WebUIDataSourceImpl);
};
-} // content
+} // namespace content
#endif // CONTENT_BROWSER_WEBUI_WEB_UI_DATA_SOURCE_IMPL_H_
« no previous file with comments | « no previous file | content/browser/webui/web_ui_data_source_impl.cc » ('j') | content/browser/webui/web_ui_data_source_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698