| 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_NETWORK_VIEW_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_NETWORK_VIEW_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_NETWORK_VIEW_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_NETWORK_VIEW_H_ |
| 7 | 7 |
| 8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
| 9 | 9 |
| 10 namespace chromeos { | 10 namespace chromeos { |
| 11 | 11 |
| 12 class NetworkModel; | 12 class NetworkScreen; |
| 13 | 13 |
| 14 // Interface for dependency injection between NetworkScreen and its actual | 14 // Interface for dependency injection between NetworkScreen and its actual |
| 15 // representation, either views based or WebUI. Owned by NetworkScreen. | 15 // representation, either views based or WebUI. Owned by NetworkScreen. |
| 16 class NetworkView { | 16 class NetworkView { |
| 17 public: | 17 public: |
| 18 virtual ~NetworkView() {} | 18 virtual ~NetworkView() {} |
| 19 | 19 |
| 20 // Shows the contents of the screen. | 20 // Shows the contents of the screen. |
| 21 virtual void Show() = 0; | 21 virtual void Show() = 0; |
| 22 | 22 |
| 23 // Hides the contents of the screen. | 23 // Hides the contents of the screen. |
| 24 virtual void Hide() = 0; | 24 virtual void Hide() = 0; |
| 25 | 25 |
| 26 // Binds |model| to the view. | 26 // Binds |screen| to the view. |
| 27 virtual void Bind(NetworkModel& model) = 0; | 27 virtual void Bind(NetworkScreen* screen) = 0; |
| 28 | 28 |
| 29 // Unbinds model from the view. | 29 // Unbinds model from the view. |
| 30 virtual void Unbind() = 0; | 30 virtual void Unbind() = 0; |
| 31 | 31 |
| 32 // Shows error message in a bubble. | 32 // Shows error message in a bubble. |
| 33 virtual void ShowError(const base::string16& message) = 0; | 33 virtual void ShowError(const base::string16& message) = 0; |
| 34 | 34 |
| 35 // Hides error messages showing no error state. | 35 // Hides error messages showing no error state. |
| 36 virtual void ClearErrors() = 0; | 36 virtual void ClearErrors() = 0; |
| 37 | 37 |
| 38 // Stops demo mode detection. | 38 // Stops demo mode detection. |
| 39 virtual void StopDemoModeDetection() = 0; | 39 virtual void StopDemoModeDetection() = 0; |
| 40 | 40 |
| 41 // Shows network connecting status or network selection otherwise. | 41 // Shows network connecting status or network selection otherwise. |
| 42 virtual void ShowConnectingStatus(bool connecting, | 42 virtual void ShowConnectingStatus(bool connecting, |
| 43 const base::string16& network_id) = 0; | 43 const base::string16& network_id) = 0; |
| 44 | 44 |
| 45 // Reloads localized contents. | 45 // Reloads localized contents. |
| 46 virtual void ReloadLocalizedContent() = 0; | 46 virtual void ReloadLocalizedContent() = 0; |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 } // namespace chromeos | 49 } // namespace chromeos |
| 50 | 50 |
| 51 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_NETWORK_VIEW_H_ | 51 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_NETWORK_VIEW_H_ |
| OLD | NEW |