OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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/chromeos/emulator/device_emulator_ui.h" | 5 #include "chrome/browser/ui/webui/chromeos/emulator/device_emulator_ui.h" |
6 | 6 |
7 #include "base/strings/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/ui/webui/chromeos/emulator/device_emulator_message_hand
ler.h" | 10 #include "chrome/browser/ui/webui/chromeos/emulator/device_emulator_message_hand
ler.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 html->AddResourcePath("bluetooth_settings.js", IDR_BLUETOOTH_SETTINGS_JS); | 35 html->AddResourcePath("bluetooth_settings.js", IDR_BLUETOOTH_SETTINGS_JS); |
36 html->SetDefaultResource(IDR_DEVICE_EMULATOR_HTML); | 36 html->SetDefaultResource(IDR_DEVICE_EMULATOR_HTML); |
37 | 37 |
38 return html; | 38 return html; |
39 } | 39 } |
40 | 40 |
41 } // namespace | 41 } // namespace |
42 | 42 |
43 DeviceEmulatorUI::DeviceEmulatorUI(content::WebUI* web_ui) | 43 DeviceEmulatorUI::DeviceEmulatorUI(content::WebUI* web_ui) |
44 : WebUIController(web_ui) { | 44 : WebUIController(web_ui) { |
45 DeviceEmulatorMessageHandler* handler = new DeviceEmulatorMessageHandler(); | 45 chromeos::DeviceEmulatorMessageHandler* handler = |
| 46 new chromeos::DeviceEmulatorMessageHandler(); |
46 handler->Init(); | 47 handler->Init(); |
47 web_ui->AddMessageHandler(handler); | 48 web_ui->AddMessageHandler(handler); |
48 | 49 |
49 content::WebUIDataSource::Add(web_ui->GetWebContents()->GetBrowserContext(), | 50 content::WebUIDataSource::Add(web_ui->GetWebContents()->GetBrowserContext(), |
50 CreateDeviceEmulatorUIDataSource()); | 51 CreateDeviceEmulatorUIDataSource()); |
51 } | 52 } |
52 | 53 |
53 DeviceEmulatorUI::~DeviceEmulatorUI() { | 54 DeviceEmulatorUI::~DeviceEmulatorUI() { |
54 } | 55 } |
OLD | NEW |