Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/ui/webui/media_router/media_router_localized_strings_pr ovider.h" | |
| 6 | |
| 7 #include "chrome/grit/generated_resources.h" | |
| 8 #include "content/public/browser/web_ui_data_source.h" | |
| 9 | |
| 10 namespace { | |
| 11 | |
| 12 // Note that media_router.html contains a <script> tag which imports a script | |
| 13 // of the following name. These names must be kept in sync. | |
| 14 const char kLocalizedStringsFile[] = "strings.js"; | |
| 15 | |
| 16 void AddMediaRouterStrings(content::WebUIDataSource* html_source) { | |
| 17 html_source->AddLocalizedString("mediaRouterTitle", IDS_MEDIA_ROUTER_TITLE); | |
| 18 } | |
| 19 | |
| 20 void AddRouteDetailsStrings(content::WebUIDataSource* html_source) { | |
| 21 html_source->AddLocalizedString("castingActivityStatus", | |
| 22 IDS_MEDIA_ROUTER_CASTING_ACTIVITY_STATUS); | |
| 23 html_source->AddLocalizedString("backToSinkList", | |
|
Bernhard Bauer
2015/04/24 07:16:54
It might be a good idea to use the same key in the
mark a. foltz
2015/04/24 20:21:09
Done.
Bernhard Bauer
2015/04/27 08:41:45
Oh, sorry, I meant to still use camelCase, but use
mark a. foltz
2015/04/27 19:38:29
No worries, done :)
| |
| 24 IDS_MEDIA_ROUTER_BACK_TO_SINK_PICKER); | |
| 25 html_source->AddLocalizedString("stopCastingButton", | |
| 26 IDS_MEDIA_ROUTER_STOP_CASTING_BUTTON); | |
| 27 } | |
| 28 | |
| 29 } // namespace | |
| 30 | |
| 31 namespace media_router { | |
| 32 | |
| 33 void AddLocalizedStrings(content::WebUIDataSource* html_source) { | |
| 34 AddMediaRouterStrings(html_source); | |
| 35 AddRouteDetailsStrings(html_source); | |
| 36 html_source->SetJsonPath(kLocalizedStringsFile); | |
| 37 } | |
| 38 | |
| 39 } // namespace media_router | |
| OLD | NEW |