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

Side by Side Diff: chrome/browser/resources/settings/site_settings/usb_devices.js

Issue 2847963003: [MD settings] specify @override on created, ready, and attached (Closed)
Patch Set: Created 3 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 unified diff | Download patch
OLDNEW
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 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * 'usb-devices' is the polymer element for showing the USB Devices category 7 * 'usb-devices' is the polymer element for showing the USB Devices category
8 * under Site Settings. 8 * under Site Settings.
9 */ 9 */
10 10
11 Polymer({ 11 Polymer({
12 is: 'usb-devices', 12 is: 'usb-devices',
13 13
14 behaviors: [SiteSettingsBehavior], 14 behaviors: [SiteSettingsBehavior],
15 15
16 properties: { 16 properties: {
17 /** 17 /**
18 * A list of all USB devices. 18 * A list of all USB devices.
19 * @private {!Array<!UsbDeviceEntry>} 19 * @private {!Array<!UsbDeviceEntry>}
20 */ 20 */
21 devices_: Array, 21 devices_: Array,
22 22
23 /** 23 /**
24 * The targetted object for menu operations. 24 * The targetted object for menu operations.
25 * @private {?Object} 25 * @private {?Object}
26 */ 26 */
27 actionMenuModel_: Object 27 actionMenuModel_: Object
28 }, 28 },
29 29
30 /** @override */
30 ready: function() { 31 ready: function() {
31 this.fetchUsbDevices_(); 32 this.fetchUsbDevices_();
32 }, 33 },
33 34
34 /** 35 /**
35 * Fetch the list of USB devices and update the list. 36 * Fetch the list of USB devices and update the list.
36 * @private 37 * @private
37 */ 38 */
38 fetchUsbDevices_: function() { 39 fetchUsbDevices_: function() {
39 this.browserProxy.fetchUsbDevices().then(function(deviceList) { 40 this.browserProxy.fetchUsbDevices().then(function(deviceList) {
(...skipping 21 matching lines...) Expand all
61 * @private 62 * @private
62 */ 63 */
63 showMenu_: function(event) { 64 showMenu_: function(event) {
64 this.actionMenuModel_ = event.model.item; 65 this.actionMenuModel_ = event.model.item;
65 /** @type {!CrActionMenuElement} */ ( 66 /** @type {!CrActionMenuElement} */ (
66 this.$$('dialog[is=cr-action-menu]')).showAt( 67 this.$$('dialog[is=cr-action-menu]')).showAt(
67 /** @type {!Element} */ ( 68 /** @type {!Element} */ (
68 Polymer.dom(/** @type {!Event} */ (event)).localTarget)); 69 Polymer.dom(/** @type {!Event} */ (event)).localTarget));
69 } 70 }
70 }); 71 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698