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

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

Issue 2549373005: cros: Refactor of BaseScreen::GetName to BaseScreen::screen_id. (Closed)
Patch Set: Nits Created 3 years, 11 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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_MODEL_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_IMAGE_MODEL_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_IMAGE_MODEL_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_IMAGE_MODEL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "chrome/browser/chromeos/login/screens/base_screen.h" 10 #include "chrome/browser/chromeos/login/screens/base_screen.h"
11 11
12 namespace chromeos { 12 namespace chromeos {
13 13
14 class BaseScreenDelegate; 14 class BaseScreenDelegate;
15 class UserImageView; 15 class UserImageView;
16 16
17 class UserImageModel : public BaseScreen { 17 class UserImageModel : public BaseScreen {
18 public: 18 public:
19 static const char kContextKeyIsCameraPresent[]; 19 static const char kContextKeyIsCameraPresent[];
20 static const char kContextKeySelectedImageURL[]; 20 static const char kContextKeySelectedImageURL[];
21 static const char kContextKeyProfilePictureDataURL[]; 21 static const char kContextKeyProfilePictureDataURL[];
22 22
23 explicit UserImageModel(BaseScreenDelegate* base_screen_delegate); 23 explicit UserImageModel(BaseScreenDelegate* base_screen_delegate);
24 ~UserImageModel() override; 24 ~UserImageModel() override;
25 25
26 // BaseScreen implementation:
27 std::string GetName() const override;
28
29 // Called when UI ready to be shown. 26 // Called when UI ready to be shown.
30 virtual void OnScreenReady() = 0; 27 virtual void OnScreenReady() = 0;
31 28
32 // Called when user accepts photo as login user image. 29 // Called when user accepts photo as login user image.
33 virtual void OnPhotoTaken(const std::string& raw_data) = 0; 30 virtual void OnPhotoTaken(const std::string& raw_data) = 0;
34 31
35 // Called when some image was selected. |is_user_selection| indicates if 32 // Called when some image was selected. |is_user_selection| indicates if
36 // it was user selection or image was selected programmatically. 33 // it was user selection or image was selected programmatically.
37 virtual void OnImageSelected(const std::string& image_url, 34 virtual void OnImageSelected(const std::string& image_url,
38 const std::string& image_type, 35 const std::string& image_type,
39 bool is_user_selection) = 0; 36 bool is_user_selection) = 0;
40 37
41 // Called when user accepts currently selected image 38 // Called when user accepts currently selected image
42 virtual void OnImageAccepted() = 0; 39 virtual void OnImageAccepted() = 0;
43 40
44 // Called when actor is destroyed so there's no dead reference to it. 41 // Called when actor is destroyed so there's no dead reference to it.
45 virtual void OnViewDestroyed(UserImageView* view) = 0; 42 virtual void OnViewDestroyed(UserImageView* view) = 0;
46 }; 43 };
47 44
48 } // namespace chromeos 45 } // namespace chromeos
49 46
50 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_IMAGE_MODEL_H_ 47 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_IMAGE_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698