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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 protected: | 76 protected: |
| 77 // Screen can call this method to notify framework that it have finished | 77 // Screen can call this method to notify framework that it have finished |
| 78 // it's work with |outcome|. | 78 // it's work with |outcome|. |
| 79 void Finish(BaseScreenDelegate::ExitCodes exit_code); | 79 void Finish(BaseScreenDelegate::ExitCodes exit_code); |
| 80 | 80 |
| 81 // Called when button with |button_id| was pressed. Notification | 81 // Called when button with |button_id| was pressed. Notification |
| 82 // about this event comes from the JS counterpart. | 82 // about this event comes from the JS counterpart. |
| 83 virtual void OnButtonPressed(const std::string& button_id); | 83 virtual void OnButtonClicked(const std::string& button_id); |
|
dzhioev (left Google)
2014/11/27 12:08:51
I propose to rename this method to something more
Denis Kuznetsov (DE-MUC)
2014/11/27 13:51:41
OnUserAction() seems better to me.
ygorshenin1
2014/11/27 14:11:13
Done.
| |
| 84 | 84 |
| 85 // The method is called each time some key in screen context is updated by JS | 85 // The method is called each time some key in screen context is updated by JS |
| 86 // side. Should be implemented in subclasses. | 86 // side. Should be implemented in subclasses. |
| 87 virtual void OnContextKeyUpdated(const ::login::ScreenContext::KeyType& key); | 87 virtual void OnContextKeyUpdated(const ::login::ScreenContext::KeyType& key); |
| 88 | 88 |
| 89 BaseScreenDelegate* get_base_screen_delegate() const { | 89 BaseScreenDelegate* get_base_screen_delegate() const { |
| 90 return base_screen_delegate_; | 90 return base_screen_delegate_; |
| 91 } | 91 } |
| 92 | 92 |
| 93 ::login::ScreenContext context_; | 93 ::login::ScreenContext context_; |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 110 void OnContextChanged(const base::DictionaryValue& diff); | 110 void OnContextChanged(const base::DictionaryValue& diff); |
| 111 | 111 |
| 112 BaseScreenDelegate* base_screen_delegate_; | 112 BaseScreenDelegate* base_screen_delegate_; |
| 113 | 113 |
| 114 DISALLOW_COPY_AND_ASSIGN(BaseScreen); | 114 DISALLOW_COPY_AND_ASSIGN(BaseScreen); |
| 115 }; | 115 }; |
| 116 | 116 |
| 117 } // namespace chromeos | 117 } // namespace chromeos |
| 118 | 118 |
| 119 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_BASE_SCREEN_H_ | 119 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_BASE_SCREEN_H_ |
| OLD | NEW |