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

Side by Side Diff: chrome/browser/ui/webui/chromeos/emulator/device_emulator_ui.cc

Issue 2006083002: Use fake Input Device Settings with chrome://device-emulator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@DevicePageTestsFixes
Patch Set: make dependent on a11y fix Created 4 years, 5 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
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/values.h" 7 #include "base/values.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/webui/chromeos/emulator/device_emulator_message_hand ler.h" 9 #include "chrome/browser/ui/webui/chromeos/emulator/device_emulator_message_hand ler.h"
10 #include "chrome/common/url_constants.h" 10 #include "chrome/common/url_constants.h"
(...skipping 17 matching lines...) Expand all
28 IDR_DEVICE_EMULATOR_AUDIO_SETTINGS_JS); 28 IDR_DEVICE_EMULATOR_AUDIO_SETTINGS_JS);
29 html->AddResourcePath("battery_settings.html", 29 html->AddResourcePath("battery_settings.html",
30 IDR_DEVICE_EMULATOR_BATTERY_SETTINGS_HTML); 30 IDR_DEVICE_EMULATOR_BATTERY_SETTINGS_HTML);
31 html->AddResourcePath("battery_settings.js", 31 html->AddResourcePath("battery_settings.js",
32 IDR_DEVICE_EMULATOR_BATTERY_SETTINGS_JS); 32 IDR_DEVICE_EMULATOR_BATTERY_SETTINGS_JS);
33 html->AddResourcePath("bluetooth_settings.html", 33 html->AddResourcePath("bluetooth_settings.html",
34 IDR_DEVICE_EMULATOR_BLUETOOTH_SETTINGS_HTML); 34 IDR_DEVICE_EMULATOR_BLUETOOTH_SETTINGS_HTML);
35 html->AddResourcePath("bluetooth_settings.js", 35 html->AddResourcePath("bluetooth_settings.js",
36 IDR_DEVICE_EMULATOR_BLUETOOTH_SETTINGS_JS); 36 IDR_DEVICE_EMULATOR_BLUETOOTH_SETTINGS_JS);
37 html->AddResourcePath("icons.html", IDR_DEVICE_EMULATOR_ICONS_HTML); 37 html->AddResourcePath("icons.html", IDR_DEVICE_EMULATOR_ICONS_HTML);
38 html->AddResourcePath("input_device_settings.html",
39 IDR_DEVICE_EMULATOR_INPUT_DEVICE_SETTINGS_HTML);
40 html->AddResourcePath("input_device_settings.js",
41 IDR_DEVICE_EMULATOR_INPUT_DEVICE_SETTINGS_JS);
38 html->AddResourcePath("device_emulator_pages.html", 42 html->AddResourcePath("device_emulator_pages.html",
39 IDR_DEVICE_EMULATOR_PAGES_HTML); 43 IDR_DEVICE_EMULATOR_PAGES_HTML);
40 html->AddResourcePath("device_emulator_pages.js", 44 html->AddResourcePath("device_emulator_pages.js",
41 IDR_DEVICE_EMULATOR_PAGES_JS); 45 IDR_DEVICE_EMULATOR_PAGES_JS);
42 46
43 html->AddResourcePath("shared_styles.html", 47 html->AddResourcePath("shared_styles.html",
44 IDR_DEVICE_EMULATOR_SHARED_STYLES_HTML); 48 IDR_DEVICE_EMULATOR_SHARED_STYLES_HTML);
45 49
46 html->SetDefaultResource(IDR_DEVICE_EMULATOR_HTML); 50 html->SetDefaultResource(IDR_DEVICE_EMULATOR_HTML);
47 51
48 return html; 52 return html;
49 } 53 }
50 54
51 } // namespace 55 } // namespace
52 56
53 DeviceEmulatorUI::DeviceEmulatorUI(content::WebUI* web_ui) 57 DeviceEmulatorUI::DeviceEmulatorUI(content::WebUI* web_ui)
54 : WebUIController(web_ui) { 58 : WebUIController(web_ui) {
55 web_ui->AddMessageHandler(new chromeos::DeviceEmulatorMessageHandler()); 59 web_ui->AddMessageHandler(new chromeos::DeviceEmulatorMessageHandler());
56 60
57 content::WebUIDataSource::Add(web_ui->GetWebContents()->GetBrowserContext(), 61 content::WebUIDataSource::Add(web_ui->GetWebContents()->GetBrowserContext(),
58 CreateDeviceEmulatorUIDataSource()); 62 CreateDeviceEmulatorUIDataSource());
59 } 63 }
60 64
61 DeviceEmulatorUI::~DeviceEmulatorUI() { 65 DeviceEmulatorUI::~DeviceEmulatorUI() {
62 } 66 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/emulator/device_emulator_message_handler.cc ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698