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

Unified 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: Addressed comments. 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/options/chromeos/internet_options_handler.h
diff --git a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.h b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.h
index b6ff3403c3bae539c35f43586e40153edf9fc67f..e09ff0931a7d0d7006abec7429bbaffb49bbf9d9 100644
--- a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.h
+++ b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.h
@@ -11,6 +11,7 @@
#include "base/memory/weak_ptr.h"
#include "chrome/browser/ui/webui/options/options_ui.h"
#include "chromeos/network/network_state_handler_observer.h"
+#include "extensions/browser/extension_registry_observer.h"
#include "ui/gfx/native_widget_types.h"
class Browser;
@@ -34,9 +35,9 @@ namespace chromeos {
namespace options {
// ChromeOS internet options page UI handler.
-class InternetOptionsHandler
- : public ::options::OptionsPageUIHandler,
- public chromeos::NetworkStateHandlerObserver {
+class InternetOptionsHandler : public ::options::OptionsPageUIHandler,
+ public chromeos::NetworkStateHandlerObserver,
+ public extensions::ExtensionRegistryObserver {
public:
InternetOptionsHandler();
~InternetOptionsHandler() override;
@@ -49,6 +50,15 @@ class InternetOptionsHandler
// WebUIMessageHandler (from OptionsPageUIHandler)
void RegisterMessages() override;
+ // ExtensionRegistryObserver
+ void OnExtensionLoaded(content::BrowserContext* browser_context,
+ const extensions::Extension* extension) override;
+ void OnExtensionUnloaded(
+ content::BrowserContext* browser_context,
+ const extensions::Extension* extension,
+ extensions::UnloadedExtensionInfo::Reason reason) override;
+ void OnShutdown(extensions::ExtensionRegistry* registry) override;
+
// Callbacks to set network state properties.
void ShowMorePlanInfoCallback(const base::ListValue* args);
void CarrierStatusCallback();
@@ -63,6 +73,9 @@ class InternetOptionsHandler
void StartConnectCallback(const base::ListValue* args);
void SetPropertiesCallback(const base::ListValue* args);
+ // Updates the list of VPN providers enabled in the primary user's profile.
+ void UpdateVPNProviders();
+
// Refreshes the display of network information.
void RefreshNetworkData();
@@ -102,6 +115,10 @@ class InternetOptionsHandler
void ActivateNetwork(const base::ListValue* args);
void RemoveNetwork(const base::ListValue* args);
+ // Requests that a list of VPN providers enabled in the primary user's
+ // profile be sent to JavaScript.
+ void LoadVPNProvidersCallback(const base::ListValue* args);
+
// Creates the map of wired networks.
base::ListValue* GetWiredList();

Powered by Google App Engine
This is Rietveld 408576698