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

Unified Diff: chrome/browser/resources/options/browser_options.js

Issue 11968034: Enable profile switching for standalone App Launcher via the Settings App. (Closed) Base URL: git://nomatter.syd/chromium/src.git@master
Patch Set: respond to comments Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/options/browser_options.js
diff --git a/chrome/browser/resources/options/browser_options.js b/chrome/browser/resources/options/browser_options.js
index e361d7257d85b001dd4747d2fb0486b102e15987..0c95d5516559dc6d7cea1f59fca7331ea412e043 100644
--- a/chrome/browser/resources/options/browser_options.js
+++ b/chrome/browser/resources/options/browser_options.js
@@ -180,6 +180,12 @@ cr.define('options', function() {
$('profiles-create').onclick = function(event) {
ManageProfileOverlay.showCreateDialog();
};
+ if (OptionsPage.isSettingsApp()) {
+ $('profiles-app-list-switch').onclick = function(event) {
+ var selectedProfile = self.getSelectedProfileItem_();
+ chrome.send('profilesAppListSwitch', [selectedProfile.filePath]);
+ };
+ }
$('profiles-manage').onclick = function(event) {
ManageProfileOverlay.showManageDialog();
};
@@ -908,6 +914,10 @@ cr.define('options', function() {
else
$('profiles-manage').title = '';
$('profiles-delete').disabled = !hasSelection && !hasSingleProfile;
+ if (OptionsPage.isSettingsApp()) {
+ $('profiles-app-list-switch').disabled = !hasSelection ||
+ selectedProfile.isCurrentProfile;
+ }
var importData = $('import-data');
if (importData) {
importData.disabled = $('import-data').disabled = hasSelection &&
@@ -929,6 +939,8 @@ cr.define('options', function() {
$('profiles-delete').textContent = hasSingleProfile ?
loadTimeData.getString('profilesDeleteSingle') :
loadTimeData.getString('profilesDelete');
+ if (OptionsPage.isSettingsApp())
+ $('profiles-app-list-switch').hidden = hasSingleProfile;
},
/**

Powered by Google App Engine
This is Rietveld 408576698