OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/compiler_specific.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 |
23 class NetworkLoginObserver : public NetworkLibrary::NetworkManagerObserver { | 24 class NetworkLoginObserver : public NetworkLibrary::NetworkManagerObserver { |
24 public: | 25 public: |
25 explicit NetworkLoginObserver(NetworkLibrary* netlib); | 26 explicit NetworkLoginObserver(NetworkLibrary* netlib); |
26 virtual ~NetworkLoginObserver(); | 27 virtual ~NetworkLoginObserver(); |
27 | 28 |
28 typedef std::map<std::string, bool> NetworkFailureMap; | 29 typedef std::map<std::string, bool> NetworkFailureMap; |
29 private: | 30 private: |
30 void CreateModalPopup(views::WidgetDelegate* view); | 31 void CreateModalPopup(views::WidgetDelegate* view); |
31 | 32 |
32 // NetworkLibrary::NetworkManagerObserver implementation. | 33 // NetworkLibrary::NetworkManagerObserver implementation. |
33 virtual void OnNetworkManagerChanged(NetworkLibrary* obj); | 34 virtual void OnNetworkManagerChanged(NetworkLibrary* obj) OVERRIDE; |
34 | 35 |
35 DISALLOW_COPY_AND_ASSIGN(NetworkLoginObserver); | 36 DISALLOW_COPY_AND_ASSIGN(NetworkLoginObserver); |
36 }; | 37 }; |
37 | 38 |
38 } // namespace chromeos | 39 } // namespace chromeos |
39 | 40 |
40 #endif // CHROME_BROWSER_CHROMEOS_NETWORK_LOGIN_OBSERVER_H_ | 41 #endif // CHROME_BROWSER_CHROMEOS_NETWORK_LOGIN_OBSERVER_H_ |
OLD | NEW |