Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / ui / webui / media_router / media_router_resources_provider.cc
blobe8508591560f0bc24360391cb142eb7b0901f7d5
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_resources_provider.h"
7 #include "content/public/browser/web_ui_data_source.h"
8 #include "grit/browser_resources.h"
10 namespace {
12 void AddMainWebResources(content::WebUIDataSource* html_source) {
13 html_source->AddResourcePath("media_router.js", IDR_MEDIA_ROUTER_JS);
14 html_source->AddResourcePath("media_router_common.css",
15 IDR_MEDIA_ROUTER_COMMON_CSS);
16 html_source->AddResourcePath("media_router.css",
17 IDR_MEDIA_ROUTER_CSS);
18 html_source->AddResourcePath("media_router_data.js",
19 IDR_MEDIA_ROUTER_DATA_JS);
20 html_source->AddResourcePath("media_router_ui_interface.js",
21 IDR_MEDIA_ROUTER_UI_INTERFACE_JS);
24 void AddPolymerElements(content::WebUIDataSource* html_source) {
25 html_source->AddResourcePath(
26 "elements/issue_banner/issue_banner.css",
27 IDR_ISSUE_BANNER_CSS);
28 html_source->AddResourcePath(
29 "elements/issue_banner/issue_banner.html",
30 IDR_ISSUE_BANNER_HTML);
31 html_source->AddResourcePath(
32 "elements/issue_banner/issue_banner.js",
33 IDR_ISSUE_BANNER_JS);
34 html_source->AddResourcePath(
35 "elements/media_router_container/media_router_container.css",
36 IDR_MEDIA_ROUTER_CONTAINER_CSS);
37 html_source->AddResourcePath(
38 "elements/media_router_container/media_router_container.html",
39 IDR_MEDIA_ROUTER_CONTAINER_HTML);
40 html_source->AddResourcePath(
41 "elements/media_router_container/media_router_container.js",
42 IDR_MEDIA_ROUTER_CONTAINER_JS);
43 html_source->AddResourcePath(
44 "elements/route_details/route_details.css",
45 IDR_ROUTE_DETAILS_CSS);
46 html_source->AddResourcePath(
47 "elements/route_details/route_details.html",
48 IDR_ROUTE_DETAILS_HTML);
49 html_source->AddResourcePath(
50 "elements/route_details/route_details.js",
51 IDR_ROUTE_DETAILS_JS);
54 } // namespace
56 namespace media_router {
58 void AddMediaRouterUIResources(content::WebUIDataSource* html_source) {
59 AddMainWebResources(html_source);
60 AddPolymerElements(html_source);
61 html_source->SetDefaultResource(IDR_MEDIA_ROUTER_HTML);
64 } // namespace media_router