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

Side by Side Diff: chrome/browser/resources/options/manage_profile_overlay.js

Issue 2136103008: Makes 'Disconnect Account' overlay in chrome://settings accessible thru a URL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/resources/options/options.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 var Page = cr.ui.pageManager.Page; 6 var Page = cr.ui.pageManager.Page;
7 var PageManager = cr.ui.pageManager.PageManager; 7 var PageManager = cr.ui.pageManager.PageManager;
8 var ArrayDataModel = cr.ui.ArrayDataModel; 8 var ArrayDataModel = cr.ui.ArrayDataModel;
9 9
10 /** 10 /**
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 loadTimeData.overrideValues(replacements); 588 loadTimeData.overrideValues(replacements);
589 $('manage-profile-overlay-create').hidden = true; 589 $('manage-profile-overlay-create').hidden = true;
590 $('manage-profile-overlay-manage').hidden = true; 590 $('manage-profile-overlay-manage').hidden = true;
591 $('manage-profile-overlay-delete').hidden = true; 591 $('manage-profile-overlay-delete').hidden = true;
592 $('disconnect-managed-profile-domain-information').innerHTML = 592 $('disconnect-managed-profile-domain-information').innerHTML =
593 loadTimeData.getString('disconnectManagedProfileDomainInformation'); 593 loadTimeData.getString('disconnectManagedProfileDomainInformation');
594 $('disconnect-managed-profile-text').innerHTML = 594 $('disconnect-managed-profile-text').innerHTML =
595 loadTimeData.getString('disconnectManagedProfileText'); 595 loadTimeData.getString('disconnectManagedProfileText');
596 $('manage-profile-overlay-disconnect-managed').hidden = false; 596 $('manage-profile-overlay-disconnect-managed').hidden = false;
597 597
598 // Because this dialog isn't useful when refreshing or as part of the 598 PageManager.showPageByName('signOut');
599 // history, don't create a history entry for it when showing.
600 PageManager.showPageByName('manageProfile', false);
601 }, 599 },
602 600
603 /** 601 /**
604 * Display the "Create Profile" dialog. 602 * Display the "Create Profile" dialog.
605 * @private 603 * @private
606 */ 604 */
607 showCreateDialog_: function() { 605 showCreateDialog_: function() {
608 PageManager.showPageByName('createProfile'); 606 PageManager.showPageByName('createProfile');
609 }, 607 },
610 }; 608 };
611 609
612 // Forward public APIs to private implementations. 610 // Forward public APIs to private implementations.
613 cr.makePublic(ManageProfileOverlay, [ 611 cr.makePublic(ManageProfileOverlay, [
614 'receiveDefaultProfileIconsAndNames', 612 'receiveDefaultProfileIconsAndNames',
615 'receiveNewProfileDefaults', 613 'receiveNewProfileDefaults',
616 'receiveExistingProfileNames', 614 'receiveExistingProfileNames',
617 'receiveHasProfileShortcuts', 615 'receiveHasProfileShortcuts',
618 'setProfileInfo', 616 'setProfileInfo',
619 'setProfileName', 617 'setProfileName',
620 'showManageDialog', 618 'showManageDialog',
621 'showDeleteDialog', 619 'showDeleteDialog',
622 'showDisconnectManagedProfileDialog', 620 'showDisconnectManagedProfileDialog',
623 'showCreateDialog', 621 'showCreateDialog',
624 ]); 622 ]);
625 623
Dan Beam 2016/07/14 00:28:36 /** * @extends {ManageProfileOverlay} * @constru
Moe 2016/07/14 15:08:47 Done.
624 function DisconnectAccountOverlay() {
625 Page.call(this, 'signOut',
626 loadTimeData.getString('disconnectAccountTabTitle'),
627 'manage-profile-overlay');
Dan Beam 2016/07/14 00:28:36 why are you using this name? shouldn't it be disc
Moe 2016/07/14 15:08:47 the third argument is the ID of the div which is t
628 };
Dan Beam 2016/07/14 00:28:36 }; -> }
Moe 2016/07/14 15:08:47 Done.
629
630 cr.addSingletonGetter(DisconnectAccountOverlay);
631
632 DisconnectAccountOverlay.prototype = {
633 // Inherit from ManageProfileOverlay.
Dan Beam 2016/07/14 00:28:36 remove this comment
Moe 2016/07/14 15:08:47 Done.
634 __proto__: ManageProfileOverlay.prototype,
635
636 /** @override */
637 canShowPage: function() {
638 var syncData = loadTimeData.getValue('syncData');
639 return syncData.signedIn && !syncData.signoutAllowed;
640 },
641
642 /** @override */
643 didShowPage: function() {
644 chrome.send('showDisconnectManagedProfileDialog');
645 }
646 };
647
626 function CreateProfileOverlay() { 648 function CreateProfileOverlay() {
627 Page.call(this, 'createProfile', 649 Page.call(this, 'createProfile',
628 loadTimeData.getString('createProfileTabTitle'), 650 loadTimeData.getString('createProfileTabTitle'),
629 'manage-profile-overlay'); 651 'manage-profile-overlay');
630 }; 652 };
631 653
632 cr.addSingletonGetter(CreateProfileOverlay); 654 cr.addSingletonGetter(CreateProfileOverlay);
633 655
634 CreateProfileOverlay.prototype = { 656 CreateProfileOverlay.prototype = {
635 // Inherit from ManageProfileOverlay. 657 // Inherit from ManageProfileOverlay.
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
876 'onSuccess', 898 'onSuccess',
877 'onWarning', 899 'onWarning',
878 'updateCreateInProgress', 900 'updateCreateInProgress',
879 'updateSignedInStatus', 901 'updateSignedInStatus',
880 'updateSupervisedUsersAllowed', 902 'updateSupervisedUsersAllowed',
881 ]); 903 ]);
882 904
883 // Export 905 // Export
884 return { 906 return {
885 ManageProfileOverlay: ManageProfileOverlay, 907 ManageProfileOverlay: ManageProfileOverlay,
908 DisconnectAccountOverlay: DisconnectAccountOverlay,
886 CreateProfileOverlay: CreateProfileOverlay, 909 CreateProfileOverlay: CreateProfileOverlay,
887 }; 910 };
888 }); 911 });
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/resources/options/options.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698