Chromium Code Reviews

Side by Side Diff: chrome/browser/chromeos/dom_ui/internet_options_handler.h

Issue 4235005: Push for ers:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_DOM_UI_INTERNET_OPTIONS_HANDLER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DOM_UI_INTERNET_OPTIONS_HANDLER_H_
6 #define CHROME_BROWSER_CHROMEOS_DOM_UI_INTERNET_OPTIONS_HANDLER_H_ 6 #define CHROME_BROWSER_CHROMEOS_DOM_UI_INTERNET_OPTIONS_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "chrome/browser/chromeos/cros/network_library.h" 10 #include "chrome/browser/chromeos/cros/network_library.h"
11 #include "chrome/browser/dom_ui/options/options_ui.h" 11 #include "chrome/browser/dom_ui/options/options_ui.h"
12 12
13 class SkBitmap; 13 class SkBitmap;
14 namespace views { 14 namespace views {
15 class WindowDelegate; 15 class WindowDelegate;
16 } 16 }
17 17
18 // ChromeOS internet options page UI handler. 18 // ChromeOS internet options page UI handler.
19 class InternetOptionsHandler : public OptionsPageUIHandler, 19 class InternetOptionsHandler
20 public chromeos::NetworkLibrary::Observer { 20 : public OptionsPageUIHandler,
21 public chromeos::NetworkLibrary::NetworkManagerObserver,
22 public chromeos::NetworkLibrary::NetworkObserver,
23 public chromeos::NetworkLibrary::CellularDataPlanObserver {
24
21 public: 25 public:
22 InternetOptionsHandler(); 26 InternetOptionsHandler();
23 virtual ~InternetOptionsHandler(); 27 virtual ~InternetOptionsHandler();
24 28
25 // OptionsUIHandler implementation. 29 // OptionsUIHandler implementation.
26 virtual void GetLocalizedValues(DictionaryValue* localized_strings); 30 virtual void GetLocalizedValues(DictionaryValue* localized_strings);
27 31
28 // DOMMessageHandler implementation. 32 // DOMMessageHandler implementation.
29 virtual void RegisterMessages(); 33 virtual void RegisterMessages();
30 34
31 // NetworkLibrary::Observer implementation. 35 // NetworkLibrary::NetworkManagerObserver implementation.
32 virtual void NetworkChanged(chromeos::NetworkLibrary* obj); 36 virtual void OnNetworkManagerChanged(chromeos::NetworkLibrary* network_lib);
33 virtual void CellularDataPlanChanged(chromeos::NetworkLibrary* obj); 37 // NetworkLibrary::NetworkObserver implementation.
38 virtual void OnNetworkChanged(chromeos::NetworkLibrary* network_lib,
39 const chromeos::Network* network);
40 // NetworkLibrary::CellularDataPlanObserver implementation.
41 virtual void OnCellularDataPlanChanged(chromeos::NetworkLibrary* network_lib);
34 42
35 private: 43 private:
36 // Passes data needed to show details overlay for network. 44 // Passes data needed to show details overlay for network.
37 // |args| will be [ network_type, service_path, command ] 45 // |args| will be [ network_type, service_path, command ]
38 // And command is one of 'options', 'connect', disconnect', or 'forget' 46 // And command is one of 'options', 'connect', disconnect', or 'forget'
39 void ButtonClickCallback(const ListValue* args); 47 void ButtonClickCallback(const ListValue* args);
40 // Initiates cellular plan data refresh. The results from libcros will 48 // Initiates cellular plan data refresh. The results from libcros will
41 // be passed through CellularDataPlanChanged() callback method. 49 // be passed through CellularDataPlanChanged() callback method.
42 // |args| will be [ service_path ] 50 // |args| will be [ service_path ]
43 void RefreshCellularPlanCallback(const ListValue* args); 51 void RefreshCellularPlanCallback(const ListValue* args);
(...skipping 30 matching lines...)
74 const std::string& name, bool connecting, bool connected, 82 const std::string& name, bool connecting, bool connected,
75 chromeos::ConnectionType connection_type, bool remembered, 83 chromeos::ConnectionType connection_type, bool remembered,
76 chromeos::ActivationState activation_state); 84 chromeos::ActivationState activation_state);
77 85
78 // Creates the map of wired networks 86 // Creates the map of wired networks
79 ListValue* GetWiredList(); 87 ListValue* GetWiredList();
80 // Creates the map of wireless networks 88 // Creates the map of wireless networks
81 ListValue* GetWirelessList(); 89 ListValue* GetWirelessList();
82 // Creates the map of remembered networks 90 // Creates the map of remembered networks
83 ListValue* GetRememberedList(); 91 ListValue* GetRememberedList();
92 // Refresh the display of network information
93 void RefreshNetworkData(chromeos::NetworkLibrary* cros);
94 // Monitor the active network, if any
95 void MonitorActiveNetwork(chromeos::NetworkLibrary* cros);
96
97 // If any network is currently active, this is its service path
98 std::string active_network_;
84 99
85 DISALLOW_COPY_AND_ASSIGN(InternetOptionsHandler); 100 DISALLOW_COPY_AND_ASSIGN(InternetOptionsHandler);
86 }; 101 };
87 102
88 #endif // CHROME_BROWSER_CHROMEOS_DOM_UI_INTERNET_OPTIONS_HANDLER_H_ 103 #endif // CHROME_BROWSER_CHROMEOS_DOM_UI_INTERNET_OPTIONS_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/network_library.cc ('k') | chrome/browser/chromeos/dom_ui/internet_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine