| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/webui/media_router/media_router_localized_strings_pr
ovider.h" | 5 #include "chrome/browser/ui/webui/media_router/media_router_localized_strings_pr
ovider.h" |
| 6 | 6 |
| 7 #include "chrome/grit/generated_resources.h" | 7 #include "chrome/grit/generated_resources.h" |
| 8 #include "content/public/browser/web_ui_data_source.h" | 8 #include "content/public/browser/web_ui_data_source.h" |
| 9 | 9 |
| 10 namespace { | 10 namespace { |
| 11 | 11 |
| 12 // Note that media_router.html contains a <script> tag which imports a script | 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. | 13 // of the following name. These names must be kept in sync. |
| 14 const char kLocalizedStringsFile[] = "strings.js"; | 14 const char kLocalizedStringsFile[] = "strings.js"; |
| 15 | 15 |
| 16 void AddMediaRouterStrings(content::WebUIDataSource* html_source) { | 16 void AddMediaRouterStrings(content::WebUIDataSource* html_source) { |
| 17 html_source->AddLocalizedString("mediaRouterTitle", IDS_MEDIA_ROUTER_TITLE); | 17 html_source->AddLocalizedString("mediaRouterTitle", IDS_MEDIA_ROUTER_TITLE); |
| 18 } | 18 } |
| 19 | 19 |
| 20 void AddRouteDetailsStrings(content::WebUIDataSource* html_source) { | 20 void AddRouteDetailsStrings(content::WebUIDataSource* html_source) { |
| 21 html_source->AddLocalizedString("castingActivityStatus", | 21 html_source->AddLocalizedString("castingActivityStatus", |
| 22 IDS_MEDIA_ROUTER_CASTING_ACTIVITY_STATUS); | 22 IDS_MEDIA_ROUTER_CASTING_ACTIVITY_STATUS); |
| 23 html_source->AddLocalizedString("stopCastingButton", | 23 html_source->AddLocalizedString("stopCastingButton", |
| 24 IDS_MEDIA_ROUTER_STOP_CASTING_BUTTON); | 24 IDS_MEDIA_ROUTER_STOP_CASTING_BUTTON); |
| 25 html_source->AddLocalizedString("joinButton", |
| 26 IDS_MEDIA_ROUTER_JOIN_BUTTON); |
| 25 } | 27 } |
| 26 | 28 |
| 27 void AddIssuesStrings(content::WebUIDataSource* html_source) { | 29 void AddIssuesStrings(content::WebUIDataSource* html_source) { |
| 28 html_source->AddLocalizedString("dismissButton", | 30 html_source->AddLocalizedString("dismissButton", |
| 29 IDS_MEDIA_ROUTER_DISMISS_BUTTON); | 31 IDS_MEDIA_ROUTER_DISMISS_BUTTON); |
| 30 html_source->AddLocalizedString("issueHeader", | 32 html_source->AddLocalizedString("issueHeader", |
| 31 IDS_MEDIA_ROUTER_ISSUE_HEADER); | 33 IDS_MEDIA_ROUTER_ISSUE_HEADER); |
| 32 html_source->AddLocalizedString("learnMoreButton", | 34 html_source->AddLocalizedString("learnMoreButton", |
| 33 IDS_MEDIA_ROUTER_LEARN_MORE_BUTTON); | 35 IDS_MEDIA_ROUTER_LEARN_MORE_BUTTON); |
| 34 } | 36 } |
| (...skipping 21 matching lines...) Expand all Loading... |
| 56 | 58 |
| 57 void AddLocalizedStrings(content::WebUIDataSource* html_source) { | 59 void AddLocalizedStrings(content::WebUIDataSource* html_source) { |
| 58 AddMediaRouterStrings(html_source); | 60 AddMediaRouterStrings(html_source); |
| 59 AddRouteDetailsStrings(html_source); | 61 AddRouteDetailsStrings(html_source); |
| 60 AddIssuesStrings(html_source); | 62 AddIssuesStrings(html_source); |
| 61 AddMediaRouterContainerStrings(html_source); | 63 AddMediaRouterContainerStrings(html_source); |
| 62 html_source->SetJsonPath(kLocalizedStringsFile); | 64 html_source->SetJsonPath(kLocalizedStringsFile); |
| 63 } | 65 } |
| 64 | 66 |
| 65 } // namespace media_router | 67 } // namespace media_router |
| OLD | NEW |