this.frame_.id = 'multi-profile-share-dialog';
this.currentProfileId_ = new Promise(function(callback) {
- chrome.fileBrowserPrivate.getProfiles(
+ chrome.fileManagerPrivate.getProfiles(
function(profiles, currentId, displayedId) {
- callback(currentId);
- });
+ callback(currentId);
+ });
});
}
* is already opened, it returns null.
*/
MultiProfileShareDialog.prototype.show = function(plural) {
- return this.currentProfileId_.
- then(function(currentProfileId) {
- return new Promise(function(fulfill, reject) {
- this.shareTypeSelect_.selectedIndex = 0;
- this.mailLabel_.textContent = currentProfileId;
- var result = FileManagerDialogBase.prototype.showOkCancelDialog.call(
- this,
- str(plural ?
- 'MULTI_PROFILE_SHARE_DIALOG_TITLE_PLURAL' :
- 'MULTI_PROFILE_SHARE_DIALOG_TITLE'),
- str(plural ?
- 'MULTI_PROFILE_SHARE_DIALOG_MESSAGE_PLURAL' :
- 'MULTI_PROFILE_SHARE_DIALOG_MESSAGE'),
- function() {
- fulfill(this.shareTypeSelect_.value);
- }.bind(this),
- function() {
- fulfill(MultiProfileShareDialog.Result.CANCEL);
- });
- if (!result)
- reject(new Error('Another dialog has already shown.'));
- }.bind(this));
- }.bind(this));
+ return this.currentProfileId_.then(function(currentProfileId) {
+ return new Promise(function(fulfill, reject) {
+ this.shareTypeSelect_.selectedIndex = 0;
+ this.mailLabel_.textContent = currentProfileId;
+ var result = FileManagerDialogBase.prototype.showOkCancelDialog.call(
+ this,
+ str(plural ?
+ 'MULTI_PROFILE_SHARE_DIALOG_TITLE_PLURAL' :
+ 'MULTI_PROFILE_SHARE_DIALOG_TITLE'),
+ str(plural ?
+ 'MULTI_PROFILE_SHARE_DIALOG_MESSAGE_PLURAL' :
+ 'MULTI_PROFILE_SHARE_DIALOG_MESSAGE'),
+ function() {
+ fulfill(this.shareTypeSelect_.value);
+ }.bind(this),
+ function() {
+ fulfill(MultiProfileShareDialog.Result.CANCEL);
+ });
+ if (!result)
+ reject(new Error('Another dialog has already shown.'));
+ }.bind(this));
+ }.bind(this));
};