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

Side by Side Diff: chrome/browser/ui/webui/cast/cast_ui.cc

Issue 1820023002: Implementation of chrome://cast page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added guestViewInternal permission for chrome://cast/* Created 4 years, 7 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 2016 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/cast/cast_ui.h"
6
7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/common/url_constants.h"
9 #include "content/public/browser/web_ui_data_source.h"
10 #include "grit/browser_resources.h"
11 #include "grit/generated_resources.h"
12
13 CastUI::CastUI(content::WebUI* web_ui)
14 : content::WebUIController(web_ui) {
15 // Set up the chrome://hello-world source.
apacible 2016/05/16 19:04:07 chrome://cast
sheretov 2016/05/17 01:59:26 Done :)
16 content::WebUIDataSource* html_source =
17 content::WebUIDataSource::Create(chrome::kChromeUICastHost);
18
19 // Add required resources.
20 html_source->AddResourcePath("cast.css", IDR_CAST_CSS);
21 html_source->AddResourcePath("cast.js", IDR_CAST_JS);
22 html_source->AddResourcePath("cast_favicon.ico", IDR_CAST_FAVICON);
23 html_source->SetDefaultResource(IDR_CAST_HTML);
24 html_source->OverrideContentSecurityPolicyObjectSrc("object-src *;");
25
26 Profile* profile = Profile::FromWebUI(web_ui);
27 content::WebUIDataSource::Add(profile, html_source);
28 }
29
30 CastUI::~CastUI() {
31 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698