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_UI_WEBUI_OPTIONS_CHROMEOS_INTERNET_OPTIONS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_INTERNET_OPTIONS_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_INTERNET_OPTIONS_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_INTERNET_OPTIONS_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "chrome/browser/ui/webui/options/options_ui.h" | 12 #include "chrome/browser/ui/webui/options/options_ui.h" |
13 #include "chromeos/login/login_state.h" | |
14 #include "chromeos/network/network_state_handler_observer.h" | 13 #include "chromeos/network/network_state_handler_observer.h" |
15 #include "content/public/browser/notification_observer.h" | 14 #include "content/public/browser/notification_observer.h" |
16 #include "content/public/browser/notification_registrar.h" | 15 #include "content/public/browser/notification_registrar.h" |
17 #include "ui/gfx/native_widget_types.h" | 16 #include "ui/gfx/native_widget_types.h" |
18 | 17 |
19 class Browser; | 18 class Browser; |
20 class PrefService; | 19 class PrefService; |
21 | 20 |
22 namespace chromeos { | 21 namespace chromeos { |
23 class DeviceState; | 22 class DeviceState; |
24 class NetworkState; | 23 class NetworkState; |
25 class NetworkStateHandlerObserver; | 24 class NetworkStateHandlerObserver; |
26 } | 25 } |
27 | 26 |
28 namespace gfx { | 27 namespace gfx { |
29 class ImageSkia; | 28 class ImageSkia; |
30 } | 29 } |
31 | 30 |
32 namespace views { | 31 namespace views { |
33 class WidgetDelegate; | 32 class WidgetDelegate; |
34 } | 33 } |
35 | 34 |
36 namespace chromeos { | 35 namespace chromeos { |
37 namespace options { | 36 namespace options { |
38 | 37 |
39 // ChromeOS internet options page UI handler. | 38 // ChromeOS internet options page UI handler. |
40 class InternetOptionsHandler | 39 class InternetOptionsHandler |
41 : public ::options::OptionsPageUIHandler, | 40 : public ::options::OptionsPageUIHandler, |
42 public chromeos::NetworkStateHandlerObserver, | 41 public chromeos::NetworkStateHandlerObserver, |
43 public chromeos::LoginState::Observer, | |
44 public content::NotificationObserver { | 42 public content::NotificationObserver { |
45 public: | 43 public: |
46 InternetOptionsHandler(); | 44 InternetOptionsHandler(); |
47 virtual ~InternetOptionsHandler(); | 45 virtual ~InternetOptionsHandler(); |
48 | 46 |
49 private: | 47 private: |
50 // OptionsPageUIHandler | 48 // OptionsPageUIHandler |
51 virtual void GetLocalizedValues( | 49 virtual void GetLocalizedValues( |
52 base::DictionaryValue* localized_strings) OVERRIDE; | 50 base::DictionaryValue* localized_strings) OVERRIDE; |
53 virtual void InitializePage() OVERRIDE; | 51 virtual void InitializePage() OVERRIDE; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 void UpdateCarrier(); | 88 void UpdateCarrier(); |
91 | 89 |
92 // NetworkStateHandlerObserver | 90 // NetworkStateHandlerObserver |
93 virtual void DeviceListChanged() OVERRIDE; | 91 virtual void DeviceListChanged() OVERRIDE; |
94 virtual void NetworkListChanged() OVERRIDE; | 92 virtual void NetworkListChanged() OVERRIDE; |
95 virtual void NetworkConnectionStateChanged( | 93 virtual void NetworkConnectionStateChanged( |
96 const chromeos::NetworkState* network) OVERRIDE; | 94 const chromeos::NetworkState* network) OVERRIDE; |
97 virtual void NetworkPropertiesUpdated( | 95 virtual void NetworkPropertiesUpdated( |
98 const chromeos::NetworkState* network) OVERRIDE; | 96 const chromeos::NetworkState* network) OVERRIDE; |
99 | 97 |
100 // chromeos::LoginState::Observer | |
101 virtual void LoggedInStateChanged() OVERRIDE; | |
102 | |
103 // Updates the logged in user type. | 98 // Updates the logged in user type. |
104 void UpdateLoggedInUserType(); | 99 void UpdateLoggedInUserType(); |
105 | 100 |
106 // content::NotificationObserver | 101 // content::NotificationObserver |
107 virtual void Observe(int type, | 102 virtual void Observe(int type, |
108 const content::NotificationSource& source, | 103 const content::NotificationSource& source, |
109 const content::NotificationDetails& details) OVERRIDE; | 104 const content::NotificationDetails& details) OVERRIDE; |
110 | 105 |
111 // Additional callbacks to set network state properties. | 106 // Additional callbacks to set network state properties. |
112 void SetServerHostnameCallback(const base::ListValue* args); | 107 void SetServerHostnameCallback(const base::ListValue* args); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 // of this object. | 161 // of this object. |
167 base::WeakPtrFactory<InternetOptionsHandler> weak_factory_; | 162 base::WeakPtrFactory<InternetOptionsHandler> weak_factory_; |
168 | 163 |
169 DISALLOW_COPY_AND_ASSIGN(InternetOptionsHandler); | 164 DISALLOW_COPY_AND_ASSIGN(InternetOptionsHandler); |
170 }; | 165 }; |
171 | 166 |
172 } // namespace options | 167 } // namespace options |
173 } // namespace chromeos | 168 } // namespace chromeos |
174 | 169 |
175 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_INTERNET_OPTIONS_HANDLER_H_ | 170 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_INTERNET_OPTIONS_HANDLER_H_ |
OLD | NEW |