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

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

Issue 267253004: Fetch a new GAIA picture every time chrome://settings/manageProfile comes up. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/GAIA/Gaia/g Created 6 years, 7 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 | Annotate | Revision Log
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.browser_options', function() { 5 cr.define('options.browser_options', function() {
6 /** @const */ var DeletableItem = options.DeletableItem; 6 /** @const */ var DeletableItem = options.DeletableItem;
7 /** @const */ var DeletableItemList = options.DeletableItemList; 7 /** @const */ var DeletableItemList = options.DeletableItemList;
8 /** @const */ var ListSingleSelectionModel = cr.ui.ListSingleSelectionModel; 8 /** @const */ var ListSingleSelectionModel = cr.ui.ListSingleSelectionModel;
9 9
10 /** 10 /**
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 deleteItemAtIndex: function(index) { 110 deleteItemAtIndex: function(index) {
111 if (loadTimeData.getBoolean('profileIsManaged')) 111 if (loadTimeData.getBoolean('profileIsManaged'))
112 return; 112 return;
113 ManageProfileOverlay.showDeleteDialog(this.dataModel.item(index)); 113 ManageProfileOverlay.showDeleteDialog(this.dataModel.item(index));
114 }, 114 },
115 115
116 /** @override */ 116 /** @override */
117 activateItemAtIndex: function(index) { 117 activateItemAtIndex: function(index) {
118 // Don't allow the user to edit a profile that is not current. 118 // Don't allow the user to edit a profile that is not current.
119 var profileInfo = this.dataModel.item(index); 119 var profileInfo = this.dataModel.item(index);
120 if (profileInfo.isCurrentProfile) 120 if (profileInfo.isCurrentProfile) {
121 chrome.send('refreshGaiaPicture');
121 ManageProfileOverlay.showManageDialog(profileInfo); 122 ManageProfileOverlay.showManageDialog(profileInfo);
123 }
122 }, 124 },
123 125
124 /** 126 /**
125 * Sets whether items in this list are deletable. 127 * Sets whether items in this list are deletable.
126 */ 128 */
127 set canDeleteItems(value) { 129 set canDeleteItems(value) {
128 this.canDeleteItems_ = value; 130 this.canDeleteItems_ = value;
129 }, 131 },
130 132
131 /** 133 /**
132 * If false, items in this list will not be deletable. 134 * If false, items in this list will not be deletable.
133 * @private 135 * @private
134 */ 136 */
135 canDeleteItems_: true, 137 canDeleteItems_: true,
136 }; 138 };
137 139
138 return { 140 return {
139 ProfileList: ProfileList 141 ProfileList: ProfileList
140 }; 142 };
141 }); 143 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698