| OLD | NEW |
| 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 * UI Pages. Note the order must be in sync with the ArcAuthService::UIPage | 6 * UI Pages. Note the order must be in sync with the ArcAuthService::UIPage |
| 7 * enum. | 7 * enum. |
| 8 * @type {Array<string>} | 8 * @type {Array<string>} |
| 9 */ | 9 */ |
| 10 var UI_PAGES = ['none', | 10 var UI_PAGES = ['none', |
| (...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 chrome.browser.openTab({'url': event.targetUrl}, function() {}); | 568 chrome.browser.openTab({'url': event.targetUrl}, function() {}); |
| 569 }); | 569 }); |
| 570 | 570 |
| 571 var onAgree = function() { | 571 var onAgree = function() { |
| 572 termsAccepted = true; | 572 termsAccepted = true; |
| 573 | 573 |
| 574 var enableMetrics = doc.getElementById('enable-metrics'); | 574 var enableMetrics = doc.getElementById('enable-metrics'); |
| 575 var enableBackupRestore = doc.getElementById('enable-backup-restore'); | 575 var enableBackupRestore = doc.getElementById('enable-backup-restore'); |
| 576 var enableLocationService = doc.getElementById('enable-location-service'); | 576 var enableLocationService = doc.getElementById('enable-location-service'); |
| 577 sendNativeMessage('onAgreed', { | 577 sendNativeMessage('onAgreed', { |
| 578 isMetricsEnabled: !enableMetrics.hidden && enableMetrics.checked, | 578 isMetricsEnabled: enableMetrics.checked, |
| 579 isBackupRestoreEnabled: enableBackupRestore.checked, | 579 isBackupRestoreEnabled: enableBackupRestore.checked, |
| 580 isLocationServiceEnabled: enableLocationService.checked | 580 isLocationServiceEnabled: enableLocationService.checked |
| 581 }); | 581 }); |
| 582 }; | 582 }; |
| 583 | 583 |
| 584 var onCancel = function() { | 584 var onCancel = function() { |
| 585 if (appWindow) { | 585 if (appWindow) { |
| 586 appWindow.close(); | 586 appWindow.close(); |
| 587 } | 587 } |
| 588 }; | 588 }; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 type: 'chrome', | 646 type: 'chrome', |
| 647 color: '#ffffff' | 647 color: '#ffffff' |
| 648 }, | 648 }, |
| 649 'innerBounds': { | 649 'innerBounds': { |
| 650 'width': INNER_WIDTH, | 650 'width': INNER_WIDTH, |
| 651 'height': INNER_HEIGHT | 651 'height': INNER_HEIGHT |
| 652 } | 652 } |
| 653 }; | 653 }; |
| 654 chrome.app.window.create('main.html', options, onWindowCreated); | 654 chrome.app.window.create('main.html', options, onWindowCreated); |
| 655 }); | 655 }); |
| OLD | NEW |