OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CHROMEOS_NETWORK_CONFIG_MESSAGE_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_NETWORK_CONFIG_MESSAGE_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_NETWORK_CONFIG_MESSAGE_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_NETWORK_CONFIG_MESSAGE_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 // This class provides support for network configuration from WebUI components. | 21 // This class provides support for network configuration from WebUI components. |
22 // It implements network_config.js which is a drop-in replacement for the | 22 // It implements network_config.js which is a drop-in replacement for the |
23 // networkingPrivate extention API. TODO(stevenjb): Implement the remaining | 23 // networkingPrivate extention API. TODO(stevenjb): Implement the remaining |
24 // networkingPrivate methods as needed. | 24 // networkingPrivate methods as needed. |
25 class NetworkConfigMessageHandler : public content::WebUIMessageHandler { | 25 class NetworkConfigMessageHandler : public content::WebUIMessageHandler { |
26 public: | 26 public: |
27 NetworkConfigMessageHandler(); | 27 NetworkConfigMessageHandler(); |
28 virtual ~NetworkConfigMessageHandler(); | 28 virtual ~NetworkConfigMessageHandler(); |
29 | 29 |
30 // WebUIMessageHandler implementation. | 30 // WebUIMessageHandler implementation. |
31 virtual void RegisterMessages() OVERRIDE; | 31 virtual void RegisterMessages() override; |
32 | 32 |
33 private: | 33 private: |
34 // WebUI::RegisterMessageCallback callbacks. These callbacks collect the | 34 // WebUI::RegisterMessageCallback callbacks. These callbacks collect the |
35 // requested information and call the associated JS method. The first | 35 // requested information and call the associated JS method. The first |
36 // argument in |arg_list| is always the callback id which is passed back | 36 // argument in |arg_list| is always the callback id which is passed back |
37 // to the callback method. | 37 // to the callback method. |
38 void GetNetworks(const base::ListValue* arg_list) const; | 38 void GetNetworks(const base::ListValue* arg_list) const; |
39 void GetProperties(const base::ListValue* arg_list); | 39 void GetProperties(const base::ListValue* arg_list); |
40 void GetManagedProperties(const base::ListValue* arg_list); | 40 void GetManagedProperties(const base::ListValue* arg_list); |
41 void GetPropertiesSuccess(int callback_id, | 41 void GetPropertiesSuccess(int callback_id, |
(...skipping 12 matching lines...) Expand all Loading... |
54 scoped_ptr<base::DictionaryValue> error_data) const; | 54 scoped_ptr<base::DictionaryValue> error_data) const; |
55 | 55 |
56 base::WeakPtrFactory<NetworkConfigMessageHandler> weak_ptr_factory_; | 56 base::WeakPtrFactory<NetworkConfigMessageHandler> weak_ptr_factory_; |
57 | 57 |
58 DISALLOW_COPY_AND_ASSIGN(NetworkConfigMessageHandler); | 58 DISALLOW_COPY_AND_ASSIGN(NetworkConfigMessageHandler); |
59 }; | 59 }; |
60 | 60 |
61 } // namespace chromeos | 61 } // namespace chromeos |
62 | 62 |
63 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_NETWORK_CONFIG_MESSAGE_HANDLER_H_ | 63 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_NETWORK_CONFIG_MESSAGE_HANDLER_H_ |
OLD | NEW |