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"
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("selectCastModeHeader",
24 IDS_MEDIA_ROUTER_SELECT_CAST_MODE_HEADER
);
25 html_source
->AddLocalizedString("shareYourScreenSubheading",
26 IDS_MEDIA_ROUTER_SHARE_YOUR_SCREEN_SUBHEADING
);
27 html_source
->AddLocalizedString("stopCastingButton",
28 IDS_MEDIA_ROUTER_STOP_CASTING_BUTTON
);
31 void AddIssuesActionsStrings(content::WebUIDataSource
* html_source
) {
32 html_source
->AddLocalizedString("dismissButton",
33 IDS_MEDIA_ROUTER_DISMISS_BUTTON
);
34 html_source
->AddLocalizedString("learnMoreButton",
35 IDS_MEDIA_ROUTER_LEARN_MORE_BUTTON
);
38 void AddSinkListStrings(content::WebUIDataSource
* html_source
) {
39 html_source
->AddLocalizedString("deviceMissing",
40 IDS_MEDIA_ROUTER_DEVICE_MISSING
);
45 namespace media_router
{
47 void AddLocalizedStrings(content::WebUIDataSource
* html_source
) {
48 AddMediaRouterStrings(html_source
);
49 AddRouteDetailsStrings(html_source
);
50 AddIssuesActionsStrings(html_source
);
51 AddSinkListStrings(html_source
);
52 html_source
->SetJsonPath(kLocalizedStringsFile
);
55 } // namespace media_router