Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/bluetooth_internals/bluetooth_internals_ui.h" | 5 #include "chrome/browser/ui/webui/bluetooth_internals/bluetooth_internals_ui.h" |
| 6 | 6 |
| 7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
| 8 #include "chrome/common/url_constants.h" | 8 #include "chrome/common/url_constants.h" |
| 9 #include "chrome/grit/browser_resources.h" | 9 #include "chrome/grit/browser_resources.h" |
| 10 #include "content/public/browser/web_ui_data_source.h" | 10 #include "content/public/browser/web_ui_data_source.h" |
| 11 | 11 |
| 12 BluetoothInternalsUI::BluetoothInternalsUI(content::WebUI* web_ui) | 12 BluetoothInternalsUI::BluetoothInternalsUI(content::WebUI* web_ui) |
| 13 : content::WebUIController(web_ui) { | 13 : content::WebUIController(web_ui) { |
| 14 // Set up the chrome://bluetooth-internals source. | 14 // Set up the chrome://bluetooth-internals source. |
| 15 content::WebUIDataSource* html_source = | 15 content::WebUIDataSource* html_source = |
| 16 content::WebUIDataSource::Create(chrome::kChromeUIBluetoothInternalsHost); | 16 content::WebUIDataSource::Create(chrome::kChromeUIBluetoothInternalsHost); |
| 17 | 17 |
| 18 // Add required resources. | 18 // Add required resources. |
| 19 html_source->AddResourcePath("bluetooth_internals.css", | 19 html_source->AddResourcePath("bluetooth_internals.css", |
| 20 IDR_BLUETOOTH_INTERNALS_CSS); | 20 IDR_BLUETOOTH_INTERNALS_CSS); |
| 21 html_source->AddResourcePath("bluetooth_internals.js", | 21 html_source->AddResourcePath("bluetooth_internals.js", |
| 22 IDR_BLUETOOTH_INTERNALS_JS); | 22 IDR_BLUETOOTH_INTERNALS_JS); |
| 23 html_source->AddResourcePath( | 23 html_source->AddResourcePath( |
| 24 "device/bluetooth/public/interfaces/adapter.mojom", | 24 "device/bluetooth/public/interfaces/adapter.mojom", |
| 25 IDR_BLUETOOTH_MOJO_JS); | 25 IDR_BLUETOOTH_ADAPTER_MOJO_JS); |
| 26 html_source->AddResourcePath( | |
| 27 "device/bluetooth/public/interfaces/device.mojom", | |
|
dpapad
2016/10/12 19:42:45
+dbeam@chromium.org
Still catching up with the de
dpapad
2016/10/12 21:02:32
Talked about this with @dbeam in person. It seems
mbrunson
2016/10/12 23:20:03
Great. scheib@ and ortuno@ are the device/bluetoot
| |
| 28 IDR_BLUETOOTH_DEVICE_MOJO_JS); | |
| 26 html_source->SetDefaultResource(IDR_BLUETOOTH_INTERNALS_HTML); | 29 html_source->SetDefaultResource(IDR_BLUETOOTH_INTERNALS_HTML); |
| 27 html_source->DisableI18nAndUseGzipForAllPaths(); | 30 html_source->DisableI18nAndUseGzipForAllPaths(); |
| 28 | 31 |
| 29 Profile* profile = Profile::FromWebUI(web_ui); | 32 Profile* profile = Profile::FromWebUI(web_ui); |
| 30 content::WebUIDataSource::Add(profile, html_source); | 33 content::WebUIDataSource::Add(profile, html_source); |
| 31 } | 34 } |
| 32 | 35 |
| 33 BluetoothInternalsUI::~BluetoothInternalsUI() {} | 36 BluetoothInternalsUI::~BluetoothInternalsUI() {} |
| OLD | NEW |