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

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: private 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 daef4fbea5dc17b4d60324aae9dfafea96c92e74..d607f789375a9221dc8b9a38cbdbc3f86acc549e 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();
};
@@ -918,6 +924,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 &&
@@ -939,6 +949,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