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_USER_IMAGE_SCREEN_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USER_IMAGE_SCREEN_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_IMAGE_SCREEN_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_IMAGE_SCREEN_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 virtual void OnDefaultImageSelected(int index) OVERRIDE; | 45 virtual void OnDefaultImageSelected(int index) OVERRIDE; |
46 virtual void OnActorDestroyed(UserImageScreenActor* actor) OVERRIDE; | 46 virtual void OnActorDestroyed(UserImageScreenActor* actor) OVERRIDE; |
47 | 47 |
48 // content::NotificationObserver implementation: | 48 // content::NotificationObserver implementation: |
49 virtual void Observe(int type, | 49 virtual void Observe(int type, |
50 const content::NotificationSource& source, | 50 const content::NotificationSource& source, |
51 const content::NotificationDetails& details) OVERRIDE; | 51 const content::NotificationDetails& details) OVERRIDE; |
52 | 52 |
53 // ProfileImageDownloader::Delegate implementation. | 53 // ProfileImageDownloader::Delegate implementation. |
54 virtual void OnDownloadSuccess(const SkBitmap& profile_image) OVERRIDE; | 54 virtual void OnDownloadSuccess(const SkBitmap& profile_image) OVERRIDE; |
| 55 virtual void OnDownloadFailure() OVERRIDE; |
| 56 virtual void OnDownloadDefaultImage() OVERRIDE; |
55 | 57 |
56 private: | 58 private: |
57 // Common method that handles setting photo or profile image. | 59 // Common method that handles setting photo or profile image. |
58 void OnNonDefaultImageSelected(const SkBitmap& image, int image_index); | 60 void OnNonDefaultImageSelected(const SkBitmap& image, int image_index); |
59 | 61 |
60 CameraController camera_controller_; | 62 CameraController camera_controller_; |
61 | 63 |
62 content::NotificationRegistrar registrar_; | 64 content::NotificationRegistrar registrar_; |
63 | 65 |
64 UserImageScreenActor* actor_; | 66 UserImageScreenActor* actor_; |
65 | 67 |
66 scoped_ptr<ProfileImageDownloader> profile_image_downloader_; | 68 scoped_ptr<ProfileImageDownloader> profile_image_downloader_; |
67 | 69 |
68 // Time when the profile image download has started. | 70 // Time when the profile image download has started. |
69 base::Time profile_image_load_start_time_; | 71 base::Time profile_image_load_start_time_; |
70 | 72 |
71 DISALLOW_COPY_AND_ASSIGN(UserImageScreen); | 73 DISALLOW_COPY_AND_ASSIGN(UserImageScreen); |
72 }; | 74 }; |
73 | 75 |
74 } // namespace chromeos | 76 } // namespace chromeos |
75 | 77 |
76 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_IMAGE_SCREEN_H_ | 78 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_IMAGE_SCREEN_H_ |
OLD | NEW |