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

Unified Diff: chrome/browser/resources/chromeos/emulator/device_emulator.js

Issue 1999593002: Update chrome://device-emulator with newer Polymer guidelines (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: narrow mode drawer + webui safety Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/chromeos/emulator/device_emulator.js
diff --git a/chrome/browser/resources/chromeos/emulator/device_emulator.js b/chrome/browser/resources/chromeos/emulator/device_emulator.js
deleted file mode 100644
index 3f49092c6473ff3ce956470a305c51a729d6610a..0000000000000000000000000000000000000000
--- a/chrome/browser/resources/chromeos/emulator/device_emulator.js
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-cr.define('device_emulator', function() {
- 'use strict';
-
- var audioSettings = $('audio-settings');
- var batterySettings = $('battery-settings');
- var bluetoothSettings = $('bluetooth-settings');
-
- function initialize() {
- audioSettings.initialize();
- batterySettings.initialize();
- bluetoothSettings.initialize();
-
- var toggles = document.getElementsByClassName('menu-item-toggle');
- for (var i = 0; i < toggles.length; ++i) {
- toggles[i].addEventListener('click', handleDrawerItemClick);
- }
- }
-
- /**
- * Shows/hides a sidebar elements designated content.
- * The content is identified by the |data-content-id| attribute of the
- * sidebar element. This value is the ID of the HTML element to be toggled.
- * @param {Event} e Contains information about the event which was fired.
- */
- function handleDrawerItemClick(e) {
- var contentId = e.target.dataset.contentId;
- var card = $(contentId);
- card.hidden = !card.hidden;
- }
-
- // Return an object with all of the exports.
- return {
- initialize: initialize,
- audioSettings: audioSettings,
- batterySettings: batterySettings,
- bluetoothSettings: bluetoothSettings,
- };
-});
-
-document.addEventListener('DOMContentLoaded', device_emulator.initialize);

Powered by Google App Engine
This is Rietveld 408576698