Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 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/devtools_bridge_ui.h" | |
| 6 | |
| 7 #include "chrome/browser/devtools/device/cloud/devtools_bridge_client.h" | |
| 8 #include "chrome/browser/profiles/profile.h" | |
| 9 #include "chrome/common/url_constants.h" | |
| 10 #include "content/public/browser/web_ui_data_source.h" | |
| 11 | |
| 12 DevToolsBridgeUI::DevToolsBridgeUI(content::WebUI* web_ui) | |
| 13 : content::WebUIController(web_ui) { | |
| 14 Profile* profile = Profile::FromWebUI(web_ui); | |
| 15 | |
| 16 content::WebUIDataSource* source = content::WebUIDataSource::Create( | |
| 17 chrome::kChromeUIDevToolsBridgeClientHost); | |
| 18 source->DisableContentSecurityPolicy(); | |
|
dgozman
2014/11/26 11:33:25
I think we could do without this.
| |
| 19 | |
| 20 DevToolsBridgeClient::AddResources(source); | |
|
pfeldman
2014/11/26 11:56:42
Merge these all.
| |
| 21 | |
| 22 content::WebUIDataSource::Add(profile, source); | |
| 23 } | |
| 24 | |
| 25 DevToolsBridgeUI::~DevToolsBridgeUI() { | |
| 26 } | |
| OLD | NEW |