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

Side by Side Diff: chrome/browser/resources/options/chromeos/bluetooth_add_device_overlay.js

Issue 553573003: Compile chrome://settings, part 3: 167 proper errors left (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@G_options_errors_1
Patch Set: rebase Created 6 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 cr.define('options', function() { 5 cr.define('options', function() {
6 /** @const */ var Page = cr.ui.pageManager.Page; 6 /** @const */ var Page = cr.ui.pageManager.Page;
7 /** @const */ var PageManager = cr.ui.pageManager.PageManager; 7 /** @const */ var PageManager = cr.ui.pageManager.PageManager;
8 8
9 /** 9 /**
10 * Encapsulated handling of the Bluetooth options page. 10 * Encapsulated handling of the Bluetooth options page.
11 * @constructor 11 * @constructor
12 * @extends {cr.ui.pageManager.Page} 12 * @extends {cr.ui.pageManager.Page}
13 */ 13 */
14 function BluetoothOptions() { 14 function BluetoothOptions() {
15 Page.call(this, 'bluetooth', 15 Page.call(this, 'bluetooth',
16 loadTimeData.getString('bluetoothOptionsPageTabTitle'), 16 loadTimeData.getString('bluetoothOptionsPageTabTitle'),
17 'bluetooth-options'); 17 'bluetooth-options');
18 } 18 }
19 19
20 cr.addSingletonGetter(BluetoothOptions); 20 cr.addSingletonGetter(BluetoothOptions);
21 21
22 BluetoothOptions.prototype = { 22 BluetoothOptions.prototype = {
23 __proto__: Page.prototype, 23 __proto__: Page.prototype,
24 24
25 /** 25 /**
26 * The list of available (unpaired) bluetooth devices. 26 * The list of available (unpaired) bluetooth devices.
27 * @type {DeletableItemList} 27 * @type {options.DeletableItemList}
28 * @private 28 * @private
29 */ 29 */
30 deviceList_: null, 30 deviceList_: null,
31 31
32 /** @override */ 32 /** @override */
33 initializePage: function() { 33 initializePage: function() {
34 Page.prototype.initializePage.call(this); 34 Page.prototype.initializePage.call(this);
35 this.createDeviceList_(); 35 this.createDeviceList_();
36 36
37 BluetoothOptions.updateDiscoveryState(true); 37 BluetoothOptions.updateDiscoveryState(true);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 /** @override */ 72 /** @override */
73 didClosePage: function() { 73 didClosePage: function() {
74 chrome.send('stopBluetoothDeviceDiscovery'); 74 chrome.send('stopBluetoothDeviceDiscovery');
75 }, 75 },
76 76
77 /** 77 /**
78 * Creates, decorates and initializes the bluetooth device list. 78 * Creates, decorates and initializes the bluetooth device list.
79 * @private 79 * @private
80 */ 80 */
81 createDeviceList_: function() { 81 createDeviceList_: function() {
82 this.deviceList_ = $('bluetooth-unpaired-devices-list'); 82 var deviceList = $('bluetooth-unpaired-devices-list');
83 options.system.bluetooth.BluetoothDeviceList.decorate(this.deviceList_); 83 options.system.bluetooth.BluetoothDeviceList.decorate(deviceList);
84 this.deviceList_ = assertInstanceof(deviceList,
85 options.DeletableItemList);
84 } 86 }
85 }; 87 };
86 88
87 /** 89 /**
88 * Automatically start the device discovery process if the 90 * Automatically start the device discovery process if the
89 * "Add device" dialog is visible. 91 * "Add device" dialog is visible.
90 */ 92 */
91 BluetoothOptions.startDeviceDiscovery = function() { 93 BluetoothOptions.startDeviceDiscovery = function() {
92 var page = BluetoothOptions.getInstance(); 94 var page = BluetoothOptions.getInstance();
93 if (page && page.visible) 95 if (page && page.visible)
(...skipping 17 matching lines...) Expand all
111 var page = BluetoothOptions.getInstance(); 113 var page = BluetoothOptions.getInstance();
112 if (page && page.visible) 114 if (page && page.visible)
113 PageManager.closeOverlay(); 115 PageManager.closeOverlay();
114 }; 116 };
115 117
116 // Export 118 // Export
117 return { 119 return {
118 BluetoothOptions: BluetoothOptions 120 BluetoothOptions: BluetoothOptions
119 }; 121 };
120 }); 122 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698