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

Unified Diff: chrome/browser/resources/chromeos/login/oobe_screen_user_image.js

Issue 2727953004: Revert of Delete "Google Profile photo" for the Active Directory (Closed)
Patch Set: Rebased. Created 3 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
« no previous file with comments | « chrome/browser/chromeos/login/screens/user_image_screen.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/login/oobe_screen_user_image.js
diff --git a/chrome/browser/resources/chromeos/login/oobe_screen_user_image.js b/chrome/browser/resources/chromeos/login/oobe_screen_user_image.js
index 4250dc33e4f6927f28d17f44d0eb6b8928ac7f66..a7d433fb426e8816dde1479c1a990265196cb7e6 100644
--- a/chrome/browser/resources/chromeos/login/oobe_screen_user_image.js
+++ b/chrome/browser/resources/chromeos/login/oobe_screen_user_image.js
@@ -10,7 +10,6 @@ login.createScreen('UserImageScreen', 'user-image', function() {
var CONTEXT_KEY_IS_CAMERA_PRESENT = 'isCameraPresent';
var CONTEXT_KEY_SELECTED_IMAGE_URL = 'selectedImageURL';
var CONTEXT_KEY_PROFILE_PICTURE_DATA_URL = 'profilePictureDataURL';
- var CONTEXT_KEY_HAS_GAIA_ACCOUNT = 'hasGaiaAccount';
var UserImagesGrid = options.UserImagesGrid;
var ButtonImages = UserImagesGrid.ButtonImages;
@@ -48,6 +47,26 @@ login.createScreen('UserImageScreen', 'user-image', function() {
loadTimeData.getString('takePhoto'),
loadTimeData.getString('photoFromCamera'));
+ this.profileImageLoading = true;
+
+ // Profile image data (if present).
+ this.profileImage_ = imageGrid.addItem(
+ ButtonImages.PROFILE_PICTURE, // Image URL.
+ loadTimeData.getString('profilePhoto'), // Title.
+ undefined, // Click handler.
+ 0, // Position.
+ function(el) {
+ // Custom decorator for Profile image element.
+ var spinner = el.ownerDocument.createElement('div');
+ spinner.className = 'spinner';
+ var spinnerBg = el.ownerDocument.createElement('div');
+ spinnerBg.className = 'spinner-bg';
+ spinnerBg.appendChild(spinner);
+ el.appendChild(spinnerBg);
+ el.id = 'profile-image';
+ });
+ this.profileImage_.type = 'profile';
+
$('take-photo').addEventListener(
'click', this.handleTakePhoto_.bind(this));
$('discard-photo').addEventListener(
@@ -72,31 +91,6 @@ login.createScreen('UserImageScreen', 'user-image', function() {
});
this.context.addObserver(CONTEXT_KEY_SELECTED_IMAGE_URL,
this.setSelectedImage_);
- this.context.addObserver(CONTEXT_KEY_HAS_GAIA_ACCOUNT,
- function(hasGaiaAccount) {
- if (!hasGaiaAccount) {
- imageGrid.removeItem(self.profileImage_);
- } else {
- self.profileImageLoading = true;
- // Profile image data (if present).
- self.profileImage_ = imageGrid.addItem(
- ButtonImages.PROFILE_PICTURE, // Image URL.
- loadTimeData.getString('profilePhoto'), // Title.
- undefined, // Click handler.
- 0, // Position.
- function(el) {
- // Custom decorator for Profile image element.
- var spinner = el.ownerDocument.createElement('div');
- spinner.className = 'spinner';
- var spinnerBg = el.ownerDocument.createElement('div');
- spinnerBg.className = 'spinner-bg';
- spinnerBg.appendChild(spinner);
- el.appendChild(spinnerBg);
- el.id = 'profile-image';
- });
- self.profileImage_.type = 'profile';
- }
- });
this.context.addObserver(CONTEXT_KEY_PROFILE_PICTURE_DATA_URL,
function(url) {
self.profileImageLoading = false;
« no previous file with comments | « chrome/browser/chromeos/login/screens/user_image_screen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698