| 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 15 matching lines...) Expand all Loading... |
| 50 | 52 |
| 51 void AddLocalizedStrings(content::WebUIDataSource* html_source) { | 53 void AddLocalizedStrings(content::WebUIDataSource* html_source) { |
| 52 AddMediaRouterStrings(html_source); | 54 AddMediaRouterStrings(html_source); |
| 53 AddRouteDetailsStrings(html_source); | 55 AddRouteDetailsStrings(html_source); |
| 54 AddIssuesStrings(html_source); | 56 AddIssuesStrings(html_source); |
| 55 AddMediaRouterContainerStrings(html_source); | 57 AddMediaRouterContainerStrings(html_source); |
| 56 html_source->SetJsonPath(kLocalizedStringsFile); | 58 html_source->SetJsonPath(kLocalizedStringsFile); |
| 57 } | 59 } |
| 58 | 60 |
| 59 } // namespace media_router | 61 } // namespace media_router |
| OLD | NEW |