OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_DOM_UI_INTERNET_OPTIONS_HANDLER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_DOM_UI_INTERNET_OPTIONS_HANDLER_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "chrome/browser/chromeos/cros/network_library.h" |
| 11 #include "chrome/browser/dom_ui/options_ui.h" |
| 12 |
| 13 class SkBitmap; |
| 14 namespace views { |
| 15 class WindowDelegate; |
| 16 } |
| 17 |
| 18 // ChromeOS internet options page UI handler. |
| 19 class InternetOptionsHandler : public OptionsPageUIHandler, |
| 20 public chromeos::NetworkLibrary::Observer { |
| 21 public: |
| 22 InternetOptionsHandler(); |
| 23 virtual ~InternetOptionsHandler(); |
| 24 |
| 25 // OptionsUIHandler implementation. |
| 26 virtual void GetLocalizedValues(DictionaryValue* localized_strings); |
| 27 |
| 28 // DOMMessageHandler implementation. |
| 29 virtual void RegisterMessages(); |
| 30 |
| 31 // NetworkLibrary::Observer implementation. |
| 32 virtual void NetworkChanged(chromeos::NetworkLibrary* obj); |
| 33 virtual void NetworkTraffic(chromeos::NetworkLibrary* cros, |
| 34 int traffic_type) {} |
| 35 |
| 36 private: |
| 37 // Open a modal popup dialog. |
| 38 void CreateModalPopup(views::WindowDelegate* view); |
| 39 // Open options dialog for network. |
| 40 // |value| will be [ network_type, service_path, command ] |
| 41 // And command is one of 'options', 'connect', disconnect', or 'forget' |
| 42 void ButtonClickCallback(const Value* value); |
| 43 |
| 44 // Creates the map of a network |
| 45 ListValue* GetNetwork(const std::string& service_path, const SkBitmap& icon, |
| 46 const std::string& name, bool connecting, bool connected, |
| 47 int connection_type, bool remembered); |
| 48 |
| 49 // Creates the map of wired networks |
| 50 ListValue* GetWiredList(); |
| 51 // Creates the map of wireless networks |
| 52 ListValue* GetWirelessList(); |
| 53 // Creates the map of remembered networks |
| 54 ListValue* GetRememberedList(); |
| 55 |
| 56 DISALLOW_COPY_AND_ASSIGN(InternetOptionsHandler); |
| 57 }; |
| 58 |
| 59 #endif // CHROME_BROWSER_CHROMEOS_DOM_UI_INTERNET_OPTIONS_HANDLER_H_ |
OLD | NEW |