| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_ACTOR_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_IMAGE_SCREEN_ACTOR_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_IMAGE_SCREEN_ACTOR_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_IMAGE_SCREEN_ACTOR_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "chrome/browser/chromeos/camera_presence_notifier.h" | |
| 11 | |
| 12 class SkBitmap; | 10 class SkBitmap; |
| 13 | 11 |
| 14 namespace gfx { | 12 namespace gfx { |
| 15 class ImageSkia; | 13 class ImageSkia; |
| 16 } | 14 } |
| 17 | 15 |
| 18 namespace chromeos { | 16 namespace chromeos { |
| 19 | 17 |
| 20 // Interface for dependency injection between UserImageScreen and its actual | 18 // Interface for dependency injection between UserImageScreen and its actual |
| 21 // representation, either views based or WebUI. | 19 // representation, either views based or WebUI. |
| 22 class UserImageScreenActor { | 20 class UserImageScreenActor { |
| 23 public: | 21 public: |
| 24 class Delegate : public CameraPresenceNotifier::Observer { | 22 class Delegate { |
| 25 public: | 23 public: |
| 26 virtual ~Delegate() {} | 24 virtual ~Delegate() {} |
| 27 | 25 |
| 28 // CameraPresenceNotifier::Observer implementation: | |
| 29 virtual void OnCameraPresenceCheckDone(bool is_camera_present) = 0; | |
| 30 | |
| 31 // Called when UI ready to be shown. | 26 // Called when UI ready to be shown. |
| 32 virtual void OnScreenReady() = 0; | 27 virtual void OnScreenReady() = 0; |
| 33 // Called when user accepts photo as login user image. | 28 // Called when user accepts photo as login user image. |
| 34 virtual void OnPhotoTaken(const std::string& raw_data) = 0; | 29 virtual void OnPhotoTaken(const std::string& raw_data) = 0; |
| 35 | 30 |
| 36 // Called when some image was selected. |is_user_selection| indicates if | 31 // Called when some image was selected. |is_user_selection| indicates if |
| 37 // it was user selection or image was selected programmatically. | 32 // it was user selection or image was selected programmatically. |
| 38 virtual void OnImageSelected(const std::string& image_url, | 33 virtual void OnImageSelected(const std::string& image_url, |
| 39 const std::string& image_type, | 34 const std::string& image_type, |
| 40 bool is_user_selection) = 0; | 35 bool is_user_selection) = 0; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 // Sends result of camera check | 74 // Sends result of camera check |
| 80 virtual void SetCameraPresent(bool enabled) = 0; | 75 virtual void SetCameraPresent(bool enabled) = 0; |
| 81 | 76 |
| 82 // Hides curtain with spinner. | 77 // Hides curtain with spinner. |
| 83 virtual void HideCurtain() = 0; | 78 virtual void HideCurtain() = 0; |
| 84 }; | 79 }; |
| 85 | 80 |
| 86 } // namespace chromeos | 81 } // namespace chromeos |
| 87 | 82 |
| 88 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_IMAGE_SCREEN_ACTOR_H_ | 83 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_IMAGE_SCREEN_ACTOR_H_ |
| OLD | NEW |