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

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

Issue 2350403003: Fix for chrome://cast getting blocked by content security policy. (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/cast/cast_ui.h" 5 #include "chrome/browser/ui/webui/cast/cast_ui.h"
6 6
7 #include "chrome/browser/media/router/media_router_factory.h" 7 #include "chrome/browser/media/router/media_router_factory.h"
8 #include "chrome/browser/media/router/mojo/media_router_mojo_impl.h" 8 #include "chrome/browser/media/router/mojo/media_router_mojo_impl.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/common/url_constants.h" 10 #include "chrome/common/url_constants.h"
(...skipping 15 matching lines...) Expand all
26 // Set up the chrome://cast data source and add required resources. 26 // Set up the chrome://cast data source and add required resources.
27 content::WebUIDataSource* html_source = 27 content::WebUIDataSource* html_source =
28 content::WebUIDataSource::Create(chrome::kChromeUICastHost); 28 content::WebUIDataSource::Create(chrome::kChromeUICastHost);
29 29
30 html_source->AddResourcePath("cast.css", IDR_CAST_CSS); 30 html_source->AddResourcePath("cast.css", IDR_CAST_CSS);
31 html_source->AddResourcePath("cast.js", IDR_CAST_JS); 31 html_source->AddResourcePath("cast.js", IDR_CAST_JS);
32 html_source->AddResourcePath("cast_favicon.ico", IDR_CAST_FAVICON); 32 html_source->AddResourcePath("cast_favicon.ico", IDR_CAST_FAVICON);
33 html_source->AddString("extensionId", extension_id); 33 html_source->AddString("extensionId", extension_id);
34 html_source->SetJsonPath("strings.js"); 34 html_source->SetJsonPath("strings.js");
35 html_source->SetDefaultResource(IDR_CAST_HTML); 35 html_source->SetDefaultResource(IDR_CAST_HTML);
36 html_source->OverrideContentSecurityPolicyObjectSrc("object-src *;"); 36 html_source->OverrideContentSecurityPolicyObjectSrc("object-src * chrome:;");
37 37
38 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), html_source); 38 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), html_source);
39 } 39 }
40 40
41 CastUI::~CastUI() { 41 CastUI::~CastUI() {
42 } 42 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698