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

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

Issue 2684883002: cros: Fold UserImageModel into UserImageScreen (Closed)
Patch Set: Address comments Created 3 years, 10 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
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_IMAGE_MODEL_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_IMAGE_MODEL_H_
7
8 #include <string>
9
10 #include "chrome/browser/chromeos/login/screens/base_screen.h"
11
12 namespace chromeos {
13
14 class BaseScreenDelegate;
15 class UserImageView;
16
17 class UserImageModel : public BaseScreen {
18 public:
19 static const char kContextKeyIsCameraPresent[];
20 static const char kContextKeySelectedImageURL[];
21 static const char kContextKeyProfilePictureDataURL[];
22 static const char kContextKeyHasGaiaAccount[];
23
24 explicit UserImageModel(BaseScreenDelegate* base_screen_delegate);
25 ~UserImageModel() override;
26
27 // Called when UI ready to be shown.
28 virtual void OnScreenReady() = 0;
29
30 // Called when user accepts photo as login user image.
31 virtual void OnPhotoTaken(const std::string& raw_data) = 0;
32
33 // Called when some image was selected. |is_user_selection| indicates if
34 // it was user selection or image was selected programmatically.
35 virtual void OnImageSelected(const std::string& image_url,
36 const std::string& image_type,
37 bool is_user_selection) = 0;
38
39 // Called when user accepts currently selected image
40 virtual void OnImageAccepted() = 0;
41
42 // Called when actor is destroyed so there's no dead reference to it.
43 virtual void OnViewDestroyed(UserImageView* view) = 0;
44 };
45
46 } // namespace chromeos
47
48 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_IMAGE_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/BUILD.gn ('k') | chrome/browser/chromeos/login/screens/user_image_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698