Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Side by Side Diff: chrome/browser/ui/webui/media_router/media_router_resources_provider.cc

Issue 1056023003: Add localized string and resource paths for media router WebUI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #include "chrome/browser/ui/webui/media_router/media_router_resources_provider.h "
6
7 #include "content/public/browser/web_ui_data_source.h"
8 #include "grit/browser_resources.h"
9
10 namespace {
11
12 void AddIcons(content::WebUIDataSource* html_source) {
13 html_source->AddResourcePath("elements/icon/chromecast-icon.png",
14 IDR_MEDIA_ROUTER_CHROMECAST_ICON);
15 html_source->AddResourcePath("elements/icon/chromecast-icon2x.png",
16 IDR_MEDIA_ROUTER_CHROMECAST_2X_ICON);
17 html_source->AddResourcePath("elements/icon/close-gray.png",
18 IDR_CLOSE_GRAY_ICON);
19 html_source->AddResourcePath("elements/icon/close-gray2x.png",
20 IDR_CLOSE_GRAY_2X_ICON);
21 html_source->AddResourcePath("elements/icon/drop-down-arrow.png",
22 IDR_DROP_DOWN_ARROW_ICON);
23 html_source->AddResourcePath("elements/icon/drop-down-arrow2x.png",
24 IDR_DROP_DOWN_ARROW_2X_ICON);
25 html_source->AddResourcePath("elements/icon/drop-down-arrow-hover.png",
26 IDR_DROP_DOWN_ARROW_HOVER_ICON);
27 html_source->AddResourcePath("elements/icon/drop-down-arrow-hover2x.png",
28 IDR_DROP_DOWN_ARROW_HOVER_2X_ICON);
29 html_source->AddResourcePath("elements/icon/drop-down-arrow-showing.png",
30 IDR_DROP_DOWN_ARROW_SHOWING_ICON);
31 html_source->AddResourcePath("elements/icon/drop-down-arrow-showing2x.png",
32 IDR_DROP_DOWN_ARROW_SHOWING_2X_ICON);
33 html_source->AddResourcePath("elements/icon/generic-device.png",
34 IDR_MEDIA_ROUTER_GENERIC_DEVICE_2X_ICON);
35 html_source->AddResourcePath("elements/icon/generic-device2x.png",
36 IDR_MEDIA_ROUTER_GENERIC_DEVICE_2X_ICON);
37 html_source->AddResourcePath("elements/icon/hangouts-icon.png",
38 IDR_MEDIA_ROUTER_HANGOUTS_2X_ICON);
39 html_source->AddResourcePath("elements/icon/hangouts-icon2x.png",
40 IDR_MEDIA_ROUTER_HANGOUTS_2X_ICON);
41 html_source->AddResourcePath("elements/icon/sad-face.png",
42 IDR_SAD_FACE_ICON);
43 html_source->AddResourcePath("elements/icon/sad-face2x.png",
44 IDR_SAD_FACE_2X_ICON);
45 }
46
47 void AddMainWebResources(content::WebUIDataSource* html_source) {
48 // TODO(apacible): Add resources when they are available.
49 html_source->AddResourcePath("media_router_data.js",
50 IDR_MEDIA_ROUTER_DATA_JS);
51 }
52
53 void AddPolymerElements(content::WebUIDataSource* html_source) {
54 // TODO(apacible): Add resources when they are available.
55 html_source->AddResourcePath(
56 "elements/cast_mode_picker/cast_mode_picker.css",
57 IDR_CAST_MODE_PICKER_CSS);
58 html_source->AddResourcePath(
59 "elements/cast_mode_picker/cast_mode_picker.html",
60 IDR_CAST_MODE_PICKER_HTML);
61 html_source->AddResourcePath(
62 "elements/cast_mode_picker/cast_mode_picker.js",
63 IDR_CAST_MODE_PICKER_JS);
64 html_source->AddResourcePath(
65 "elements/drop_down_button/drop_down_button.css",
66 IDR_DROP_DOWN_BUTTON_CSS);
67 html_source->AddResourcePath(
68 "elements/drop_down_button/drop_down_button.html",
69 IDR_DROP_DOWN_BUTTON_HTML);
70 html_source->AddResourcePath(
71 "elements/drop_down_button/drop_down_button.js",
72 IDR_DROP_DOWN_BUTTON_JS);
73 html_source->AddResourcePath(
74 "elements/issue_banner/issue_banner.css",
75 IDR_ISSUE_BANNER_CSS);
76 html_source->AddResourcePath(
77 "elements/issue_banner/issue_banner.html",
78 IDR_ISSUE_BANNER_HTML);
79 html_source->AddResourcePath(
80 "elements/issue_banner/issue_banner.js",
81 IDR_ISSUE_BANNER_JS);
82 }
83
84 } // namespace
85
86 namespace media_router {
87
88 void AddMediaRouterUIResources(content::WebUIDataSource* html_source) {
89 AddIcons(html_source);
90 AddMainWebResources(html_source);
91 AddPolymerElements(html_source);
92 html_source->SetDefaultResource(IDR_MEDIA_ROUTER_HTML);
93 }
94
95 } // namespace media_router
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/media_router/media_router_resources_provider.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698