Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_BASE_SCREEN_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_BASE_SCREEN_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_BASE_SCREEN_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_BASE_SCREEN_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 66 // displayed. | 66 // displayed. |
| 67 virtual bool IsStatusAreaDisplayed(); | 67 virtual bool IsStatusAreaDisplayed(); |
| 68 | 68 |
| 69 // If this method returns |true|, screen will not be deleted once we leave it. | 69 // If this method returns |true|, screen will not be deleted once we leave it. |
| 70 // However, Initialize() might be called several times in this case. | 70 // However, Initialize() might be called several times in this case. |
| 71 virtual bool IsPermanent(); | 71 virtual bool IsPermanent(); |
| 72 | 72 |
| 73 // Returns the identifier of the screen. | 73 // Returns the identifier of the screen. |
| 74 virtual std::string GetID() const; | 74 virtual std::string GetID() const; |
| 75 | 75 |
| 76 // Called when context for the currenct screen was | |
| 77 // changed. Notification about this event comes from the JS | |
| 78 // counterpart. | |
|
Denis Kuznetsov (DE-MUC)
2014/11/25 17:31:16
Please keep it protected, use friend classes inste
ygorshenin1
2014/11/26 11:45:40
Done.
ygorshenin1
2014/11/26 11:45:40
Done.
| |
| 79 virtual void OnContextChanged(const base::DictionaryValue& diff); | |
| 80 | |
| 76 protected: | 81 protected: |
| 77 // Screen can call this method to notify framework that it have finished | 82 // Screen can call this method to notify framework that it have finished |
| 78 // it's work with |outcome|. | 83 // it's work with |outcome|. |
| 79 void Finish(BaseScreenDelegate::ExitCodes exit_code); | 84 void Finish(BaseScreenDelegate::ExitCodes exit_code); |
| 80 | 85 |
| 81 // Called when button with |button_id| was pressed. Notification | 86 // Called when button with |button_id| was pressed. Notification |
| 82 // about this event comes from the JS counterpart. | 87 // about this event comes from the JS counterpart. |
| 83 virtual void OnButtonPressed(const std::string& button_id); | 88 virtual void OnButtonPressed(const std::string& button_id); |
| 84 | 89 |
| 85 // Called when context for the currenct screen was | |
| 86 // changed. Notification about this event comes from the JS | |
| 87 // counterpart. | |
| 88 virtual void OnContextChanged(const base::DictionaryValue* diff); | |
| 89 | |
| 90 BaseScreenDelegate* get_base_screen_delegate() const { | 90 BaseScreenDelegate* get_base_screen_delegate() const { |
| 91 return base_screen_delegate_; | 91 return base_screen_delegate_; |
| 92 } | 92 } |
| 93 | 93 |
| 94 ::login::ScreenContext context_; | 94 ::login::ScreenContext context_; |
| 95 | 95 |
| 96 private: | 96 private: |
| 97 FRIEND_TEST_ALL_PREFIXES(EnrollmentScreenTest, TestCancel); | 97 FRIEND_TEST_ALL_PREFIXES(EnrollmentScreenTest, TestCancel); |
| 98 FRIEND_TEST_ALL_PREFIXES(EnrollmentScreenTest, TestSuccess); | 98 FRIEND_TEST_ALL_PREFIXES(EnrollmentScreenTest, TestSuccess); |
| 99 FRIEND_TEST_ALL_PREFIXES(ProvisionedEnrollmentScreenTest, TestBackButton); | 99 FRIEND_TEST_ALL_PREFIXES(ProvisionedEnrollmentScreenTest, TestBackButton); |
| 100 | 100 |
| 101 friend class NetworkScreenTest; | 101 friend class NetworkScreenTest; |
| 102 friend class ScreenManager; | 102 friend class ScreenManager; |
| 103 friend class UpdateScreenTest; | 103 friend class UpdateScreenTest; |
| 104 | 104 |
| 105 void SetContext(::login::ScreenContext* context); | 105 void SetContext(::login::ScreenContext* context); |
| 106 | 106 |
| 107 BaseScreenDelegate* base_screen_delegate_; | 107 BaseScreenDelegate* base_screen_delegate_; |
| 108 | 108 |
| 109 DISALLOW_COPY_AND_ASSIGN(BaseScreen); | 109 DISALLOW_COPY_AND_ASSIGN(BaseScreen); |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 } // namespace chromeos | 112 } // namespace chromeos |
| 113 | 113 |
| 114 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_BASE_SCREEN_H_ | 114 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_BASE_SCREEN_H_ |
| OLD | NEW |