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

Side by Side Diff: chrome/browser/resources/options/chromeos/bluetooth_pair_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 * Enumeration of possible states during pairing. The value associated with 10 * Enumeration of possible states during pairing. The value associated with
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 } 145 }
146 }, 146 },
147 147
148 /** 148 /**
149 * Override to prevent showing the overlay if the Bluetooth device details 149 * Override to prevent showing the overlay if the Bluetooth device details
150 * have not been specified. Prevents showing an empty dialog if the user 150 * have not been specified. Prevents showing an empty dialog if the user
151 * quits and restarts Chrome while in the process of pairing with a device. 151 * quits and restarts Chrome while in the process of pairing with a device.
152 * @return {boolean} True if the overlay can be displayed. 152 * @return {boolean} True if the overlay can be displayed.
153 */ 153 */
154 canShowPage: function() { 154 canShowPage: function() {
155 return this.device_ && this.device_.address && this.device_.pairing; 155 return !!(this.device_ && this.device_.address && this.device_.pairing);
156 }, 156 },
157 157
158 /** 158 /**
159 * Sets input focus on the passkey or pincode field if appropriate. 159 * Sets input focus on the passkey or pincode field if appropriate.
160 */ 160 */
161 didShowPage: function() { 161 didShowPage: function() {
162 if (!$('bluetooth-pincode').hidden) 162 if (!$('bluetooth-pincode').hidden)
163 $('bluetooth-pincode').focus(); 163 $('bluetooth-pincode').focus();
164 else if (!$('bluetooth-passkey').hidden) 164 else if (!$('bluetooth-passkey').hidden)
165 $('bluetooth-passkey').focus(); 165 $('bluetooth-passkey').focus();
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 dialog.device_.pairing = PAIRING.DISMISSED; 375 dialog.device_.pairing = PAIRING.DISMISSED;
376 PageManager.closeOverlay(); 376 PageManager.closeOverlay();
377 } 377 }
378 }; 378 };
379 379
380 // Export 380 // Export
381 return { 381 return {
382 BluetoothPairing: BluetoothPairing 382 BluetoothPairing: BluetoothPairing
383 }; 383 };
384 }); 384 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698