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

Side by Side Diff: chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.js

Issue 2146553005: MD Settings: Bluetooth: Add error dialog and messages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_602538_bluetooth_fixes_0
Patch Set: Feedback 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 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 cr.exportPath('settings'); 5 cr.exportPath('settings');
6 6
7 (function() { 7 (function() {
8 8
9 var PairingEventType = chrome.bluetoothPrivate.PairingEventType; 9 var PairingEventType = chrome.bluetoothPrivate.PairingEventType;
10 10
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 close: function() { this.$.dialog.close(); }, 350 close: function() { this.$.dialog.close(); },
351 351
352 /** @private */ 352 /** @private */
353 deviceListChanged_: function(e) { this.$.dialog.notifyResize(); }, 353 deviceListChanged_: function(e) { this.$.dialog.notifyResize(); },
354 354
355 /** 355 /**
356 * @param {string} dialogId 356 * @param {string} dialogId
357 * @return {string} The title of for that |dialogId|. 357 * @return {string} The title of for that |dialogId|.
358 */ 358 */
359 getTitle_: function(dialogId) { 359 getTitle_: function(dialogId) {
360 return this.i18n( 360 if (dialogId == 'addDevice')
361 dialogId == 'addDevice' ? 'bluetoothAddDevicePageTitle' : 361 return this.i18n('bluetoothAddDevicePageTitle');
362 'bluetoothPairDevicePageTitle'); 362 // Use the 'pair' title for the pairing dialog and error dialog.
363 return this.i18n('bluetoothPairDevicePageTitle');
363 }, 364 },
364 365
365 /** 366 /**
366 * @param {string} currentDialogType 367 * @param {string} currentDialogType
367 * @param {string} wantedDialogType 368 * @param {string} wantedDialogType
368 * @return {boolean} 369 * @return {boolean}
369 * @private 370 * @private
370 */ 371 */
371 isDialogType_: function(currentDialogType, wantedDialogType) { 372 isDialogType_: function(currentDialogType, wantedDialogType) {
372 return currentDialogType == wantedDialogType; 373 return currentDialogType == wantedDialogType;
(...skipping 11 matching lines...) Expand all
384 onIronOverlayCanceled_: function() { 385 onIronOverlayCanceled_: function() {
385 if (this.dialogId == 'pairDevice') 386 if (this.dialogId == 'pairDevice')
386 this.sendResponse_(chrome.bluetoothPrivate.PairingResponse.CANCEL); 387 this.sendResponse_(chrome.bluetoothPrivate.PairingResponse.CANCEL);
387 }, 388 },
388 389
389 /** @private */ 390 /** @private */
390 onIronOverlayClosed_: function() { this.fire('close-dialog', ''); }, 391 onIronOverlayClosed_: function() { this.fire('close-dialog', ''); },
391 }); 392 });
392 393
393 })(); 394 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698