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

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

Issue 213623005: CameraPresenceNotifier observers removal supported. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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) 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" 10 #include "chrome/browser/chromeos/camera_presence_notifier.h"
11 11
12 class SkBitmap; 12 class SkBitmap;
13 13
14 namespace gfx { 14 namespace gfx {
15 class ImageSkia; 15 class ImageSkia;
16 } 16 }
17 17
18 namespace chromeos { 18 namespace chromeos {
19 19
20 // Interface for dependency injection between UserImageScreen and its actual 20 // Interface for dependency injection between UserImageScreen and its actual
21 // representation, either views based or WebUI. 21 // representation, either views based or WebUI.
22 class UserImageScreenActor { 22 class UserImageScreenActor {
23 public: 23 public:
24 class Delegate : public CameraPresenceNotifier::Observer { 24 class Delegate : public CameraPresenceNotifier::Observer {
25 public: 25 public:
26 virtual ~Delegate() {} 26 virtual ~Delegate() {
27 CameraPresenceNotifier::GetInstance()->RemoveObserver(this);
ygorshenin1 2014/04/03 11:45:49 No need to call RemoveObserver() here. It'll be ca
28 }
27 29
28 // CameraPresenceNotifier::Observer implementation: 30 // CameraPresenceNotifier::Observer implementation:
29 virtual void OnCameraPresenceCheckDone(bool is_camera_present) = 0; 31 virtual void OnCameraPresenceCheckDone(bool is_camera_present) = 0;
30 32
31 // Called when UI ready to be shown. 33 // Called when UI ready to be shown.
32 virtual void OnScreenReady() = 0; 34 virtual void OnScreenReady() = 0;
33 // Called when user accepts photo as login user image. 35 // Called when user accepts photo as login user image.
34 virtual void OnPhotoTaken(const std::string& raw_data) = 0; 36 virtual void OnPhotoTaken(const std::string& raw_data) = 0;
35 37
36 // Called when some image was selected. |is_user_selection| indicates if 38 // Called when some image was selected. |is_user_selection| indicates if
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // Sends result of camera check 81 // Sends result of camera check
80 virtual void SetCameraPresent(bool enabled) = 0; 82 virtual void SetCameraPresent(bool enabled) = 0;
81 83
82 // Hides curtain with spinner. 84 // Hides curtain with spinner.
83 virtual void HideCurtain() = 0; 85 virtual void HideCurtain() = 0;
84 }; 86 };
85 87
86 } // namespace chromeos 88 } // namespace chromeos
87 89
88 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_IMAGE_SCREEN_ACTOR_H_ 90 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_IMAGE_SCREEN_ACTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698