#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
+#include "chrome/browser/chromeos/camera_presence_notifier.h"
#include "chrome/browser/chromeos/login/screens/user_image_screen_actor.h"
#include "chrome/browser/chromeos/login/screens/wizard_screen.h"
-#include "chrome/browser/chromeos/login/user.h"
-#include "chrome/browser/chromeos/login/user_image_sync_observer.h"
+#include "chrome/browser/chromeos/login/users/avatar/user_image_sync_observer.h"
#include "chrome/browser/image_decoder.h"
+#include "components/user_manager/user.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
namespace chromeos {
+class UserImageManager;
+class ScreenManager;
+
class UserImageScreen: public WizardScreen,
public UserImageScreenActor::Delegate,
public ImageDecoder::Delegate,
public content::NotificationObserver,
- public UserImageSyncObserver::Observer {
+ public UserImageSyncObserver::Observer,
+ public CameraPresenceNotifier::Observer {
public:
UserImageScreen(ScreenObserver* screen_observer,
UserImageScreenActor* actor);
virtual ~UserImageScreen();
- // Indicates whether profile picture is enabled for given user.
- void SetProfilePictureEnabled(bool support_profile_picture);
- // Sets |user_id| of user that would have picture updated.
- void SetUserID(const std::string& user_id);
+ static UserImageScreen* Get(ScreenManager* manager);
// WizardScreen implementation:
virtual void PrepareToShow() OVERRIDE;
virtual void OnImageDecoded(const ImageDecoder* decoder,
const SkBitmap& decoded_image) OVERRIDE;
virtual void OnDecodeImageFailed(const ImageDecoder* decoder) OVERRIDE;
+
+ // CameraPresenceNotifier::Observer implementation:
virtual void OnCameraPresenceCheckDone(bool is_camera_present) OVERRIDE;
// UserImageSyncObserver::Observer implementation:
const base::Value* current);
// Returns current user.
- const User* GetUser();
+ const user_manager::User* GetUser();
// Returns UserImageManager for the current user.
UserImageManager* GetUserImageManager();
// Index of the selected user image.
int selected_image_;
- bool profile_picture_enabled_;
-
// Encoded profile picture.
std::string profile_picture_data_url_;
// True if user has no custom profile picture.
bool profile_picture_absent_;
- std::string user_id_;
-
// Timer used for waiting for user image sync.
scoped_ptr<base::Timer> sync_timer_;