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

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: Updated to read the extension ID from the new ONC property. 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 : public ::options::OptionsPageUIHandler,
38 : public ::options::OptionsPageUIHandler, 39 public chromeos::NetworkStateHandlerObserver,
39 public chromeos::NetworkStateHandlerObserver { 40 public extensions::ExtensionRegistryObserver {
40 public: 41 public:
41 InternetOptionsHandler(); 42 InternetOptionsHandler();
42 ~InternetOptionsHandler() override; 43 ~InternetOptionsHandler() override;
43 44
44 private: 45 private:
45 // OptionsPageUIHandler 46 // OptionsPageUIHandler
46 void GetLocalizedValues(base::DictionaryValue* localized_strings) override; 47 void GetLocalizedValues(base::DictionaryValue* localized_strings) override;
47 void InitializePage() override; 48 void InitializePage() override;
48 49
49 // WebUIMessageHandler (from OptionsPageUIHandler) 50 // WebUIMessageHandler (from OptionsPageUIHandler)
50 void RegisterMessages() override; 51 void RegisterMessages() override;
51 52
53 // ExtensionRegistryObserver
54 void OnExtensionLoaded(content::BrowserContext* browser_context,
55 const extensions::Extension* extension) override;
56 void OnExtensionUnloaded(
57 content::BrowserContext* browser_context,
58 const extensions::Extension* extension,
59 extensions::UnloadedExtensionInfo::Reason reason) override;
60 void OnShutdown(extensions::ExtensionRegistry* registry) override;
61
52 // Callbacks to set network state properties. 62 // Callbacks to set network state properties.
53 void ShowMorePlanInfoCallback(const base::ListValue* args); 63 void ShowMorePlanInfoCallback(const base::ListValue* args);
54 void CarrierStatusCallback(); 64 void CarrierStatusCallback();
55 void SetCarrierCallback(const base::ListValue* args); 65 void SetCarrierCallback(const base::ListValue* args);
56 void SimOperationCallback(const base::ListValue* args); 66 void SimOperationCallback(const base::ListValue* args);
67 void UpdateVPNProvidersCallback(const base::ListValue* args);
57 68
58 // Sets details_guid_ for event forwarding. 69 // Sets details_guid_ for event forwarding.
59 void SetNetworkGuidCallback(const base::ListValue* args); 70 void SetNetworkGuidCallback(const base::ListValue* args);
60 71
61 // networkingPrvate callbacks 72 // networkingPrvate callbacks
62 void GetManagedPropertiesCallback(const base::ListValue* args); 73 void GetManagedPropertiesCallback(const base::ListValue* args);
63 void StartConnectCallback(const base::ListValue* args); 74 void StartConnectCallback(const base::ListValue* args);
64 void SetPropertiesCallback(const base::ListValue* args); 75 void SetPropertiesCallback(const base::ListValue* args);
65 76
77 // Updates the list of VPN providers enabled in the primary user's profile.
78 void UpdateVPNProviders();
79
66 // Refreshes the display of network information. 80 // Refreshes the display of network information.
67 void RefreshNetworkData(); 81 void RefreshNetworkData();
68 82
69 // Updates the display of network connection information for the details page 83 // Updates the display of network connection information for the details page
70 // if visible. 84 // if visible.
71 void UpdateConnectionData(const std::string& service_path); 85 void UpdateConnectionData(const std::string& service_path);
72 86
73 // Callback for ManagedNetworkConnectionHandler::GetManagedProperties. 87 // Callback for ManagedNetworkConnectionHandler::GetManagedProperties.
74 // Calls the JS callback |js_callback_function| with the result. 88 // Calls the JS callback |js_callback_function| with the result.
75 void GetManagedPropertiesResult(const std::string& js_callback_function, 89 void GetManagedPropertiesResult(const std::string& js_callback_function,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // of this object. 139 // of this object.
126 base::WeakPtrFactory<InternetOptionsHandler> weak_factory_; 140 base::WeakPtrFactory<InternetOptionsHandler> weak_factory_;
127 141
128 DISALLOW_COPY_AND_ASSIGN(InternetOptionsHandler); 142 DISALLOW_COPY_AND_ASSIGN(InternetOptionsHandler);
129 }; 143 };
130 144
131 } // namespace options 145 } // namespace options
132 } // namespace chromeos 146 } // namespace chromeos
133 147
134 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_INTERNET_OPTIONS_HANDLER_H_ 148 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_INTERNET_OPTIONS_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698