Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: chrome/browser/ui/webui/options/chromeos/internet_options_handler.h

Issue 23466015: network_list.js should reflect the correct logged in user type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased and addressed stevenjb@'s comments. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 NetworkConnectionStateChanged( 92 virtual void NetworkConnectionStateChanged(
91 const chromeos::NetworkState* network) OVERRIDE; 93 const chromeos::NetworkState* network) OVERRIDE;
92 virtual void NetworkPropertiesUpdated( 94 virtual void NetworkPropertiesUpdated(
93 const chromeos::NetworkState* network) OVERRIDE; 95 const chromeos::NetworkState* network) OVERRIDE;
94 96
97 // chromeos::LoginState::Observer
98 virtual void LoggedInStateChanged(
99 chromeos::LoginState::LoggedInState) OVERRIDE;
100
101 // Updates the logged in user type.
102 void UpdateLoggedInUserType();
103
95 // content::NotificationObserver (from OptionsPageUIHandler) 104 // content::NotificationObserver (from OptionsPageUIHandler)
96 virtual void Observe(int type, 105 virtual void Observe(int type,
97 const content::NotificationSource& source, 106 const content::NotificationSource& source,
98 const content::NotificationDetails& details) OVERRIDE; 107 const content::NotificationDetails& details) OVERRIDE;
99 108
100 // Additional callbacks to set network state properties. 109 // Additional callbacks to set network state properties.
101 void SetServerHostnameCallback(const base::ListValue* args); 110 void SetServerHostnameCallback(const base::ListValue* args);
102 void SetPreferNetworkCallback(const base::ListValue* args); 111 void SetPreferNetworkCallback(const base::ListValue* args);
103 void SetAutoConnectCallback(const base::ListValue* args); 112 void SetAutoConnectCallback(const base::ListValue* args);
104 void SetIPConfigCallback(const base::ListValue* args); 113 void SetIPConfigCallback(const base::ListValue* args);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 // of this object. 162 // of this object.
154 base::WeakPtrFactory<InternetOptionsHandler> weak_factory_; 163 base::WeakPtrFactory<InternetOptionsHandler> weak_factory_;
155 164
156 DISALLOW_COPY_AND_ASSIGN(InternetOptionsHandler); 165 DISALLOW_COPY_AND_ASSIGN(InternetOptionsHandler);
157 }; 166 };
158 167
159 } // namespace options 168 } // namespace options
160 } // namespace chromeos 169 } // namespace chromeos
161 170
162 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_INTERNET_OPTIONS_HANDLER_H_ 171 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_INTERNET_OPTIONS_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698