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

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

Issue 260083007: Replace chrome://network implementation with networkConfig API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Feedback Created 6 years, 7 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_NETWORK_CONFIG_MESSAGE_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_NETWORK_CONFIG_MESSAGE_HANDLER_H_
7
8 #include <string>
9
10 #include "base/memory/scoped_ptr.h"
11 #include "content/public/browser/web_ui_message_handler.h"
12
13 namespace base {
14 class DictionaryValue;
15 class ListValue;
16 }
17
18 namespace chromeos {
19
20 // This class provides support for network configuration from WebUI components.
21 // It implements network_config.js which is a drop-in replacement for the
22 // networkingPrivate extention API. TODO(stevenjb): Implement the remaining
23 // networkingPrivate methods as needed.
24 class NetworkConfigMessageHandler : public content::WebUIMessageHandler {
25 public:
26 NetworkConfigMessageHandler();
27 virtual ~NetworkConfigMessageHandler();
28
29 // WebUIMessageHandler implementation.
30 virtual void RegisterMessages() OVERRIDE;
31
32 private:
33 // WebUI::RegisterMessageCallback callbacks. These callbacks collect the
34 // requested information and call the associated JS method. The first
35 // argument in |arg_list| is always the callback id which is passed back
36 // to the callback method.
37 void GetVisibleNetworks(const base::ListValue* arg_list) const;
38 void GetProperties(const base::ListValue* arg_list) const;
39 void GetPropertiesSuccess(int callback_id,
40 const std::string& service_path,
41 const base::DictionaryValue& dictionary) const;
42 void InvokeCallback(const base::ListValue& arg_list) const;
43 void ErrorCallback(int callback_id,
44 const std::string& error_name,
45 scoped_ptr<base::DictionaryValue> error_data) const;
46
47 DISALLOW_COPY_AND_ASSIGN(NetworkConfigMessageHandler);
48 };
49
50 } // namespace chromeos
51
52 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_NETWORK_CONFIG_MESSAGE_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698