| 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_NETWORK_LOGIN_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_NETWORK_LOGIN_OBSERVER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_NETWORK_LOGIN_OBSERVER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_NETWORK_LOGIN_OBSERVER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "chrome/browser/chromeos/cros/cert_library.h" |
| 13 #include "chrome/browser/chromeos/cros/network_library.h" | 14 #include "chrome/browser/chromeos/cros/network_library.h" |
| 14 | 15 |
| 15 namespace views { | 16 namespace views { |
| 16 class WidgetDelegate; | 17 class WidgetDelegate; |
| 17 } | 18 } |
| 18 | 19 |
| 19 namespace chromeos { | 20 namespace chromeos { |
| 20 | 21 |
| 21 // The network login observer reshows a login dialog if there was an error. | 22 // The network login observer reshows a login dialog if there was an error. |
| 22 | 23 // It is also responsible for signaling Shill to when certificates are loaded. |
| 23 class NetworkLoginObserver : public NetworkLibrary::NetworkManagerObserver { | 24 class NetworkLoginObserver : public NetworkLibrary::NetworkManagerObserver, |
| 25 public CertLibrary::Observer { |
| 24 public: | 26 public: |
| 25 NetworkLoginObserver(); | 27 NetworkLoginObserver(); |
| 26 virtual ~NetworkLoginObserver(); | 28 virtual ~NetworkLoginObserver(); |
| 27 | 29 |
| 28 typedef std::map<std::string, bool> NetworkFailureMap; | 30 typedef std::map<std::string, bool> NetworkFailureMap; |
| 29 private: | 31 private: |
| 30 void CreateModalPopup(views::WidgetDelegate* view); | 32 void CreateModalPopup(views::WidgetDelegate* view); |
| 31 | 33 |
| 32 // NetworkLibrary::NetworkManagerObserver implementation. | 34 // NetworkLibrary::NetworkManagerObserver |
| 33 virtual void OnNetworkManagerChanged(NetworkLibrary* obj) OVERRIDE; | 35 virtual void OnNetworkManagerChanged(NetworkLibrary* obj) OVERRIDE; |
| 34 | 36 |
| 37 // CertLibrary::Observer |
| 38 virtual void OnCertificatesLoaded(bool initial_load) OVERRIDE; |
| 39 |
| 35 DISALLOW_COPY_AND_ASSIGN(NetworkLoginObserver); | 40 DISALLOW_COPY_AND_ASSIGN(NetworkLoginObserver); |
| 36 }; | 41 }; |
| 37 | 42 |
| 38 } // namespace chromeos | 43 } // namespace chromeos |
| 39 | 44 |
| 40 #endif // CHROME_BROWSER_CHROMEOS_NETWORK_LOGIN_OBSERVER_H_ | 45 #endif // CHROME_BROWSER_CHROMEOS_NETWORK_LOGIN_OBSERVER_H_ |
| OLD | NEW |