Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / ui / webui / media_router / media_router_localized_strings_provider.cc
blob4f4e26b4a4d183487f2e610e9f18d1ab0a12c2e3
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.
5 #include "chrome/browser/ui/webui/media_router/media_router_localized_strings_provider.h"
7 #include "chrome/grit/generated_resources.h"
8 #include "content/public/browser/web_ui_data_source.h"
10 namespace {
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";
16 void AddMediaRouterStrings(content::WebUIDataSource* html_source) {
17 html_source->AddLocalizedString("mediaRouterTitle", IDS_MEDIA_ROUTER_TITLE);
20 void AddRouteDetailsStrings(content::WebUIDataSource* html_source) {
21 html_source->AddLocalizedString("castingActivityStatus",
22 IDS_MEDIA_ROUTER_CASTING_ACTIVITY_STATUS);
23 html_source->AddLocalizedString("stopCastingButton",
24 IDS_MEDIA_ROUTER_STOP_CASTING_BUTTON);
27 void AddIssuesActionsStrings(content::WebUIDataSource* html_source) {
28 html_source->AddLocalizedString("dismissButton",
29 IDS_MEDIA_ROUTER_DISMISS_BUTTON);
30 html_source->AddLocalizedString("learnMoreButton",
31 IDS_MEDIA_ROUTER_LEARN_MORE_BUTTON);
34 void AddMediaRouterContainerStrings(content::WebUIDataSource* html_source) {
35 html_source->AddLocalizedString("deviceMissing",
36 IDS_MEDIA_ROUTER_DEVICE_MISSING);
37 html_source->AddLocalizedString("selectCastModeHeader",
38 IDS_MEDIA_ROUTER_SELECT_CAST_MODE_HEADER);
39 html_source->AddLocalizedString("shareYourScreenSubheading",
40 IDS_MEDIA_ROUTER_SHARE_YOUR_SCREEN_SUBHEADING);
43 } // namespace
45 namespace media_router {
47 void AddLocalizedStrings(content::WebUIDataSource* html_source) {
48 AddMediaRouterStrings(html_source);
49 AddRouteDetailsStrings(html_source);
50 AddIssuesActionsStrings(html_source);
51 AddMediaRouterContainerStrings(html_source);
52 html_source->SetJsonPath(kLocalizedStringsFile);
55 } // namespace media_router