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

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

Issue 12090062: Enable profile switching for standalone App Launcher via the Settings App. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: disable tests on aura Created 7 years, 10 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 c574dc6f7db39ef2b43b6b5e2fafeaa5a85226fa..e2a1a7dc1e55ffd4952c36fcb5738c365f863582 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('switchAppListProfile', [selectedProfile.filePath]);
+ };
+ }
$('profiles-manage').onclick = function(event) {
ManageProfileOverlay.showManageDialog();
};
@@ -919,6 +925,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 &&
@@ -940,6 +950,8 @@ cr.define('options', function() {
$('profiles-delete').textContent = hasSingleProfile ?
loadTimeData.getString('profilesDeleteSingle') :
loadTimeData.getString('profilesDelete');
+ if (OptionsPage.isSettingsApp())
+ $('profiles-app-list-switch').hidden = hasSingleProfile;
},
/**
« no previous file with comments | « chrome/browser/resources/options/browser_options.html ('k') | chrome/browser/resources/options/options_page.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698