| 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" |
| 13 #include "chromeos/network/network_state_handler_observer.h" | 14 #include "chromeos/network/network_state_handler_observer.h" |
| 14 #include "content/public/browser/notification_registrar.h" | 15 #include "content/public/browser/notification_registrar.h" |
| 15 #include "ui/gfx/native_widget_types.h" | 16 #include "ui/gfx/native_widget_types.h" |
| 16 | 17 |
| 17 class Browser; | 18 class Browser; |
| 18 | 19 |
| 19 namespace chromeos { | 20 namespace chromeos { |
| 20 class DeviceState; | 21 class DeviceState; |
| 21 class NetworkState; | 22 class NetworkState; |
| 22 class NetworkStateHandlerObserver; | 23 class NetworkStateHandlerObserver; |
| 23 } | 24 } |
| 24 | 25 |
| 25 namespace gfx { | 26 namespace gfx { |
| 26 class ImageSkia; | 27 class ImageSkia; |
| 27 } | 28 } |
| 28 | 29 |
| 29 namespace views { | 30 namespace views { |
| 30 class WidgetDelegate; | 31 class WidgetDelegate; |
| 31 } | 32 } |
| 32 | 33 |
| 33 namespace chromeos { | 34 namespace chromeos { |
| 34 namespace options { | 35 namespace options { |
| 35 | 36 |
| 36 // ChromeOS internet options page UI handler. | 37 // ChromeOS internet options page UI handler. |
| 37 class InternetOptionsHandler | 38 class InternetOptionsHandler |
| 38 : public ::options::OptionsPageUIHandler, | 39 : public ::options::OptionsPageUIHandler, |
| 39 public chromeos::NetworkStateHandlerObserver { | 40 public chromeos::NetworkStateHandlerObserver, |
| 41 public chromeos::LoginState::Observer { |
| 40 public: | 42 public: |
| 41 InternetOptionsHandler(); | 43 InternetOptionsHandler(); |
| 42 virtual ~InternetOptionsHandler(); | 44 virtual ~InternetOptionsHandler(); |
| 43 | 45 |
| 44 private: | 46 private: |
| 45 // OptionsPageUIHandler | 47 // OptionsPageUIHandler |
| 46 virtual void GetLocalizedValues( | 48 virtual void GetLocalizedValues( |
| 47 base::DictionaryValue* localized_strings) OVERRIDE; | 49 base::DictionaryValue* localized_strings) OVERRIDE; |
| 48 virtual void InitializePage() OVERRIDE; | 50 virtual void InitializePage() OVERRIDE; |
| 49 | 51 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 const base::DictionaryValue& shill_properties); | 85 const base::DictionaryValue& shill_properties); |
| 84 // Called when carrier data has been updated to informs the JS. | 86 // Called when carrier data has been updated to informs the JS. |
| 85 void UpdateCarrier(); | 87 void UpdateCarrier(); |
| 86 | 88 |
| 87 // NetworkStateHandlerObserver | 89 // NetworkStateHandlerObserver |
| 88 virtual void NetworkManagerChanged() OVERRIDE; | 90 virtual void NetworkManagerChanged() OVERRIDE; |
| 89 virtual void NetworkListChanged() OVERRIDE; | 91 virtual void NetworkListChanged() OVERRIDE; |
| 90 virtual void NetworkPropertiesUpdated( | 92 virtual void NetworkPropertiesUpdated( |
| 91 const chromeos::NetworkState* network) OVERRIDE; | 93 const chromeos::NetworkState* network) OVERRIDE; |
| 92 | 94 |
| 95 // chromeos::LoginState::Observer |
| 96 virtual void LoggedInStateChanged( |
| 97 chromeos::LoginState::LoggedInState) OVERRIDE; |
| 98 |
| 99 // Updates the logged in user type. |
| 100 void UpdateLoggedInUserType(); |
| 101 |
| 93 // content::NotificationObserver (from OptionsPageUIHandler) | 102 // content::NotificationObserver (from OptionsPageUIHandler) |
| 94 virtual void Observe(int type, | 103 virtual void Observe(int type, |
| 95 const content::NotificationSource& source, | 104 const content::NotificationSource& source, |
| 96 const content::NotificationDetails& details) OVERRIDE; | 105 const content::NotificationDetails& details) OVERRIDE; |
| 97 | 106 |
| 98 // Additional callbacks to set network state properties. | 107 // Additional callbacks to set network state properties. |
| 99 void SetServerHostnameCallback(const base::ListValue* args); | 108 void SetServerHostnameCallback(const base::ListValue* args); |
| 100 void SetPreferNetworkCallback(const base::ListValue* args); | 109 void SetPreferNetworkCallback(const base::ListValue* args); |
| 101 void SetAutoConnectCallback(const base::ListValue* args); | 110 void SetAutoConnectCallback(const base::ListValue* args); |
| 102 void SetIPConfigCallback(const base::ListValue* args); | 111 void SetIPConfigCallback(const base::ListValue* args); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 // of this object. | 157 // of this object. |
| 149 base::WeakPtrFactory<InternetOptionsHandler> weak_factory_; | 158 base::WeakPtrFactory<InternetOptionsHandler> weak_factory_; |
| 150 | 159 |
| 151 DISALLOW_COPY_AND_ASSIGN(InternetOptionsHandler); | 160 DISALLOW_COPY_AND_ASSIGN(InternetOptionsHandler); |
| 152 }; | 161 }; |
| 153 | 162 |
| 154 } // namespace options | 163 } // namespace options |
| 155 } // namespace chromeos | 164 } // namespace chromeos |
| 156 | 165 |
| 157 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_INTERNET_OPTIONS_HANDLER_H_ | 166 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_INTERNET_OPTIONS_HANDLER_H_ |
| OLD | NEW |