| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_IMAGE_SCREEN_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_IMAGE_SCREEN_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_IMAGE_SCREEN_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_IMAGE_SCREEN_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/browser/chromeos/camera_presence_notifier.h" | 10 #include "chrome/browser/chromeos/camera_presence_notifier.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 public UserImageScreenActor::Delegate, | 31 public UserImageScreenActor::Delegate, |
| 32 public ImageDecoder::Delegate, | 32 public ImageDecoder::Delegate, |
| 33 public content::NotificationObserver, | 33 public content::NotificationObserver, |
| 34 public UserImageSyncObserver::Observer, | 34 public UserImageSyncObserver::Observer, |
| 35 public CameraPresenceNotifier::Observer { | 35 public CameraPresenceNotifier::Observer { |
| 36 public: | 36 public: |
| 37 UserImageScreen(ScreenObserver* screen_observer, | 37 UserImageScreen(ScreenObserver* screen_observer, |
| 38 UserImageScreenActor* actor); | 38 UserImageScreenActor* actor); |
| 39 virtual ~UserImageScreen(); | 39 virtual ~UserImageScreen(); |
| 40 | 40 |
| 41 // Indicates whether profile picture is enabled for given user. | |
| 42 void SetProfilePictureEnabled(bool support_profile_picture); | |
| 43 // Sets |user_id| of user that would have picture updated. | |
| 44 void SetUserID(const std::string& user_id); | |
| 45 | |
| 46 // WizardScreen implementation: | 41 // WizardScreen implementation: |
| 47 virtual void PrepareToShow() OVERRIDE; | 42 virtual void PrepareToShow() OVERRIDE; |
| 48 virtual void Show() OVERRIDE; | 43 virtual void Show() OVERRIDE; |
| 49 virtual void Hide() OVERRIDE; | 44 virtual void Hide() OVERRIDE; |
| 50 virtual std::string GetName() const OVERRIDE; | 45 virtual std::string GetName() const OVERRIDE; |
| 51 | 46 |
| 52 // UserImageScreenActor::Delegate implementation: | 47 // UserImageScreenActor::Delegate implementation: |
| 53 virtual void OnScreenReady() OVERRIDE; | 48 virtual void OnScreenReady() OVERRIDE; |
| 54 virtual void OnPhotoTaken(const std::string& raw_data) OVERRIDE; | 49 virtual void OnPhotoTaken(const std::string& raw_data) OVERRIDE; |
| 55 virtual void OnImageSelected(const std::string& image_url, | 50 virtual void OnImageSelected(const std::string& image_url, |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 gfx::ImageSkia user_photo_; | 116 gfx::ImageSkia user_photo_; |
| 122 | 117 |
| 123 // If |true|, decoded photo should be immediately accepeted (i.e., both | 118 // If |true|, decoded photo should be immediately accepeted (i.e., both |
| 124 // HandleTakePhoto and HandleImageAccepted have already been called but we're | 119 // HandleTakePhoto and HandleImageAccepted have already been called but we're |
| 125 // still waiting for photo image decoding to finish. | 120 // still waiting for photo image decoding to finish. |
| 126 bool accept_photo_after_decoding_; | 121 bool accept_photo_after_decoding_; |
| 127 | 122 |
| 128 // Index of the selected user image. | 123 // Index of the selected user image. |
| 129 int selected_image_; | 124 int selected_image_; |
| 130 | 125 |
| 131 bool profile_picture_enabled_; | |
| 132 | |
| 133 // Encoded profile picture. | 126 // Encoded profile picture. |
| 134 std::string profile_picture_data_url_; | 127 std::string profile_picture_data_url_; |
| 135 | 128 |
| 136 // True if user has no custom profile picture. | 129 // True if user has no custom profile picture. |
| 137 bool profile_picture_absent_; | 130 bool profile_picture_absent_; |
| 138 | 131 |
| 139 std::string user_id_; | |
| 140 | |
| 141 // Timer used for waiting for user image sync. | 132 // Timer used for waiting for user image sync. |
| 142 scoped_ptr<base::Timer> sync_timer_; | 133 scoped_ptr<base::Timer> sync_timer_; |
| 143 | 134 |
| 144 // If screen ready to be shown. | 135 // If screen ready to be shown. |
| 145 bool is_screen_ready_; | 136 bool is_screen_ready_; |
| 146 | 137 |
| 147 // True if user has explicitly selected some image. | 138 // True if user has explicitly selected some image. |
| 148 bool user_has_selected_image_; | 139 bool user_has_selected_image_; |
| 149 | 140 |
| 150 DISALLOW_COPY_AND_ASSIGN(UserImageScreen); | 141 DISALLOW_COPY_AND_ASSIGN(UserImageScreen); |
| 151 }; | 142 }; |
| 152 | 143 |
| 153 } // namespace chromeos | 144 } // namespace chromeos |
| 154 | 145 |
| 155 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_IMAGE_SCREEN_H_ | 146 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_IMAGE_SCREEN_H_ |
| OLD | NEW |