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

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

Issue 1006553002: Add third-party VPN support to network details dialog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@f_2_460428_add_ash_ui
Patch Set: Prepare for removal of GetManagedPropertiesResult() by tracking VPN providers and networks separate… Created 5 years, 9 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
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/network/network_state_handler_observer.h" 13 #include "chromeos/network/network_state_handler_observer.h"
14 #include "extensions/browser/extension_registry_observer.h"
14 #include "ui/gfx/native_widget_types.h" 15 #include "ui/gfx/native_widget_types.h"
15 16
16 class Browser; 17 class Browser;
17 class PrefService; 18 class PrefService;
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 extensions::ExtensionRegistryObserver {
40 public: 42 public:
41 InternetOptionsHandler(); 43 InternetOptionsHandler();
42 ~InternetOptionsHandler() override; 44 ~InternetOptionsHandler() override;
43 45
44 private: 46 private:
45 // OptionsPageUIHandler 47 // OptionsPageUIHandler
46 void GetLocalizedValues(base::DictionaryValue* localized_strings) override; 48 void GetLocalizedValues(base::DictionaryValue* localized_strings) override;
47 void InitializePage() override; 49 void InitializePage() override;
48 50
49 // WebUIMessageHandler (from OptionsPageUIHandler) 51 // WebUIMessageHandler (from OptionsPageUIHandler)
50 void RegisterMessages() override; 52 void RegisterMessages() override;
51 53
54 // ExtensionRegistryObserver
55 void OnExtensionLoaded(content::BrowserContext* browser_context,
56 const extensions::Extension* extension) override;
57 void OnExtensionUnloaded(
58 content::BrowserContext* browser_context,
59 const extensions::Extension* extension,
60 extensions::UnloadedExtensionInfo::Reason reason) override;
61 void OnShutdown(extensions::ExtensionRegistry* registry) override;
62
52 // Callbacks to set network state properties. 63 // Callbacks to set network state properties.
53 void ShowMorePlanInfoCallback(const base::ListValue* args); 64 void ShowMorePlanInfoCallback(const base::ListValue* args);
54 void CarrierStatusCallback(); 65 void CarrierStatusCallback();
55 void SetCarrierCallback(const base::ListValue* args); 66 void SetCarrierCallback(const base::ListValue* args);
56 void SimOperationCallback(const base::ListValue* args); 67 void SimOperationCallback(const base::ListValue* args);
57 68
58 // networkingPrvate callbacks 69 // networkingPrvate callbacks
59 void GetManagedPropertiesCallback(const base::ListValue* args); 70 void GetManagedPropertiesCallback(const base::ListValue* args);
60 void StartConnectCallback(const base::ListValue* args); 71 void StartConnectCallback(const base::ListValue* args);
61 void SetPropertiesCallback(const base::ListValue* args); 72 void SetPropertiesCallback(const base::ListValue* args);
62 73
74 // Updates the list of VPN providers enabled in the primary user's profile.
75 void UpdateVPNProviders();
76
63 // Refreshes the display of network information. 77 // Refreshes the display of network information.
64 void RefreshNetworkData(); 78 void RefreshNetworkData();
65 79
66 // Updates the display of network connection information for the details page 80 // Updates the display of network connection information for the details page
67 // if visible. 81 // if visible.
68 void UpdateConnectionData(const std::string& service_path); 82 void UpdateConnectionData(const std::string& service_path);
69 83
70 // Callback for ManagedNetworkConnectionHandler::GetManagedProperties. 84 // Callback for ManagedNetworkConnectionHandler::GetManagedProperties.
71 // Calls the JS callback |js_callback_function| with the result. 85 // Calls the JS callback |js_callback_function| with the result.
72 void GetManagedPropertiesResult(const std::string& js_callback_function, 86 void GetManagedPropertiesResult(const std::string& js_callback_function,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // of this object. 136 // of this object.
123 base::WeakPtrFactory<InternetOptionsHandler> weak_factory_; 137 base::WeakPtrFactory<InternetOptionsHandler> weak_factory_;
124 138
125 DISALLOW_COPY_AND_ASSIGN(InternetOptionsHandler); 139 DISALLOW_COPY_AND_ASSIGN(InternetOptionsHandler);
126 }; 140 };
127 141
128 } // namespace options 142 } // namespace options
129 } // namespace chromeos 143 } // namespace chromeos
130 144
131 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_INTERNET_OPTIONS_HANDLER_H_ 145 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_INTERNET_OPTIONS_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698