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

Side by Side Diff: chrome/browser/chromeos/login/screens/user_image_screen.h

Issue 213623005: CameraPresenceNotifier observers removal supported. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Logic moved to screens. Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/login/screens/user_image_screen_actor.h" 11 #include "chrome/browser/chromeos/login/screens/user_image_screen_actor.h"
11 #include "chrome/browser/chromeos/login/screens/wizard_screen.h" 12 #include "chrome/browser/chromeos/login/screens/wizard_screen.h"
12 #include "chrome/browser/chromeos/login/user.h" 13 #include "chrome/browser/chromeos/login/user.h"
13 #include "chrome/browser/chromeos/login/user_image_sync_observer.h" 14 #include "chrome/browser/chromeos/login/user_image_sync_observer.h"
14 #include "chrome/browser/image_decoder.h" 15 #include "chrome/browser/image_decoder.h"
15 #include "content/public/browser/notification_observer.h" 16 #include "content/public/browser/notification_observer.h"
16 #include "content/public/browser/notification_registrar.h" 17 #include "content/public/browser/notification_registrar.h"
17 18
18 namespace base { 19 namespace base {
19 class Timer; 20 class Timer;
20 class Value; 21 class Value;
21 }; 22 };
22 23
23 namespace policy { 24 namespace policy {
24 class PolicyChangeRegistrar; 25 class PolicyChangeRegistrar;
25 } 26 }
26 27
27 namespace chromeos { 28 namespace chromeos {
28 29
29 class UserImageScreen: public WizardScreen, 30 class UserImageScreen: public WizardScreen,
30 public UserImageScreenActor::Delegate, 31 public UserImageScreenActor::Delegate,
31 public ImageDecoder::Delegate, 32 public ImageDecoder::Delegate,
32 public content::NotificationObserver, 33 public content::NotificationObserver,
33 public UserImageSyncObserver::Observer { 34 public UserImageSyncObserver::Observer,
35 public CameraPresenceNotifier::Observer {
34 public: 36 public:
35 UserImageScreen(ScreenObserver* screen_observer, 37 UserImageScreen(ScreenObserver* screen_observer,
36 UserImageScreenActor* actor); 38 UserImageScreenActor* actor);
37 virtual ~UserImageScreen(); 39 virtual ~UserImageScreen();
38 40
39 // Indicates whether profile picture is enabled for given user. 41 // Indicates whether profile picture is enabled for given user.
40 void SetProfilePictureEnabled(bool support_profile_picture); 42 void SetProfilePictureEnabled(bool support_profile_picture);
41 // Sets |user_id| of user that would have picture updated. 43 // Sets |user_id| of user that would have picture updated.
42 void SetUserID(const std::string& user_id); 44 void SetUserID(const std::string& user_id);
43 45
(...skipping 18 matching lines...) Expand all
62 64
63 // content::NotificationObserver implementation: 65 // content::NotificationObserver implementation:
64 virtual void Observe(int type, 66 virtual void Observe(int type,
65 const content::NotificationSource& source, 67 const content::NotificationSource& source,
66 const content::NotificationDetails& details) OVERRIDE; 68 const content::NotificationDetails& details) OVERRIDE;
67 69
68 // ImageDecoder::Delegate implementation: 70 // ImageDecoder::Delegate implementation:
69 virtual void OnImageDecoded(const ImageDecoder* decoder, 71 virtual void OnImageDecoded(const ImageDecoder* decoder,
70 const SkBitmap& decoded_image) OVERRIDE; 72 const SkBitmap& decoded_image) OVERRIDE;
71 virtual void OnDecodeImageFailed(const ImageDecoder* decoder) OVERRIDE; 73 virtual void OnDecodeImageFailed(const ImageDecoder* decoder) OVERRIDE;
74
75 // CameraPresenceNotifier::Observer implementation:
72 virtual void OnCameraPresenceCheckDone(bool is_camera_present) OVERRIDE; 76 virtual void OnCameraPresenceCheckDone(bool is_camera_present) OVERRIDE;
73 77
74 // UserImageSyncObserver::Observer implementation: 78 // UserImageSyncObserver::Observer implementation:
75 virtual void OnInitialSync(bool local_image_updated) OVERRIDE; 79 virtual void OnInitialSync(bool local_image_updated) OVERRIDE;
76 80
77 bool user_selected_image() const { return user_has_selected_image_; } 81 bool user_selected_image() const { return user_has_selected_image_; }
78 82
79 private: 83 private:
80 // Called when whaiting for sync timed out. 84 // Called when whaiting for sync timed out.
81 void OnSyncTimeout(); 85 void OnSyncTimeout();
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 146
143 // True if user has explicitly selected some image. 147 // True if user has explicitly selected some image.
144 bool user_has_selected_image_; 148 bool user_has_selected_image_;
145 149
146 DISALLOW_COPY_AND_ASSIGN(UserImageScreen); 150 DISALLOW_COPY_AND_ASSIGN(UserImageScreen);
147 }; 151 };
148 152
149 } // namespace chromeos 153 } // namespace chromeos
150 154
151 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_IMAGE_SCREEN_H_ 155 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_IMAGE_SCREEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698