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

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: 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) 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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698