networking_private_api.h revision c5cede9ae108bb15f6b7a8aea21c7e1fefa2834c
158e6fbe4ee35d65e14b626c557d37565bf8ad179Ben Murdoch// Copyright 2013 The Chromium Authors. All rights reserved. 22a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 32a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// found in the LICENSE file. 42a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 52a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// These classes implement the chrome.networkingPrivate JavaScript extension 62a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// API. 72a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 858e6fbe4ee35d65e14b626c557d37565bf8ad179Ben Murdoch#ifndef CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_API_H_ 958e6fbe4ee35d65e14b626c557d37565bf8ad179Ben Murdoch#define CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_API_H_ 102a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 112a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#include <string> 122a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 132a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#include "base/memory/ref_counted.h" 142a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#include "base/values.h" 151e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)#include "chrome/browser/extensions/chrome_extension_function.h" 162a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#include "chromeos/dbus/dbus_method_call_status.h" 17a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)#include "components/keyed_service/core/keyed_service.h" 182a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 192a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Implements the chrome.networkingPrivate.getProperties method. 201e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)class NetworkingPrivateGetPropertiesFunction 211e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) : public ChromeAsyncExtensionFunction { 222a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) public: 232a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) NetworkingPrivateGetPropertiesFunction() {} 242a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) DECLARE_EXTENSION_FUNCTION("networkingPrivate.getProperties", 252a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) NETWORKINGPRIVATE_GETPROPERTIES); 262a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 272a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) protected: 282a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) virtual ~NetworkingPrivateGetPropertiesFunction(); 292a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 302a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) // AsyncExtensionFunction overrides. 312a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) virtual bool RunImpl() OVERRIDE; 322a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 332a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) private: 342a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) void GetPropertiesSuccess(const std::string& service_path, 352a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const base::DictionaryValue& result); 362a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) void GetPropertiesFailed(const std::string& error_name, 372a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) scoped_ptr<base::DictionaryValue> error_data); 382a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateGetPropertiesFunction); 392a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}; 402a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 41c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)// Implements the chrome.networkingPrivate.getManagedProperties method. 42c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)class NetworkingPrivateGetManagedPropertiesFunction 431e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) : public ChromeAsyncExtensionFunction { 44c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) public: 45c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) NetworkingPrivateGetManagedPropertiesFunction() {} 46c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) DECLARE_EXTENSION_FUNCTION("networkingPrivate.getManagedProperties", 47c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) NETWORKINGPRIVATE_GETMANAGEDPROPERTIES); 48c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) 49c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) protected: 50c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) virtual ~NetworkingPrivateGetManagedPropertiesFunction(); 51c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) 52c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) // AsyncExtensionFunction overrides. 53c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) virtual bool RunImpl() OVERRIDE; 54c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) 55c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) private: 56c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) // Callbacks for ManagedNetworkConfigurationHandler::GetManagedProperties. 57c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) void Success(const std::string& service_path, 58c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) const base::DictionaryValue& result); 59c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) void Failure(const std::string& error_name, 60c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) scoped_ptr<base::DictionaryValue> error_data); 61c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) 62c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateGetManagedPropertiesFunction); 63c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)}; 64c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) 652a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Implements the chrome.networkingPrivate.getState method. 661e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)class NetworkingPrivateGetStateFunction : public ChromeAsyncExtensionFunction { 672a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) public: 682a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) NetworkingPrivateGetStateFunction() {} 692a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) DECLARE_EXTENSION_FUNCTION("networkingPrivate.getState", 702a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) NETWORKINGPRIVATE_GETSTATE); 712a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 722a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) protected: 732a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) virtual ~NetworkingPrivateGetStateFunction(); 742a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 752a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) // AsyncExtensionFunction overrides. 762a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) virtual bool RunImpl() OVERRIDE; 772a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 782a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) private: 79a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles) void Success(const std::string& service_path, 80a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles) const base::DictionaryValue& result); 81a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles) void Failure(const std::string& error_name, 82a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles) scoped_ptr<base::DictionaryValue> error_data); 83a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles) 842a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateGetStateFunction); 852a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}; 862a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 872a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Implements the chrome.networkingPrivate.setProperties method. 881e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)class NetworkingPrivateSetPropertiesFunction 891e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) : public ChromeAsyncExtensionFunction { 902a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) public: 912a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) NetworkingPrivateSetPropertiesFunction() {} 922a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) DECLARE_EXTENSION_FUNCTION("networkingPrivate.setProperties", 932a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) NETWORKINGPRIVATE_SETPROPERTIES); 942a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 952a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) protected: 962a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) virtual ~NetworkingPrivateSetPropertiesFunction(); 972a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 982a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) // AsyncExtensionFunction overrides. 992a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) virtual bool RunImpl() OVERRIDE; 1002a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 1012a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) private: 1022a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) void ErrorCallback(const std::string& error_name, 1032a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const scoped_ptr<base::DictionaryValue> error_data); 1042a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) void ResultCallback(); 1052a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateSetPropertiesFunction); 1062a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}; 1072a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 10858537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)// Implements the chrome.networkingPrivate.createNetwork method. 1091e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)class NetworkingPrivateCreateNetworkFunction 1101e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) : public ChromeAsyncExtensionFunction { 11158537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) public: 11258537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) NetworkingPrivateCreateNetworkFunction() {} 11358537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) DECLARE_EXTENSION_FUNCTION("networkingPrivate.createNetwork", 11458537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) NETWORKINGPRIVATE_CREATENETWORK); 11558537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) 11658537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) protected: 11758537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) virtual ~NetworkingPrivateCreateNetworkFunction(); 11858537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) 11958537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) // AsyncExtensionFunction overrides. 12058537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) virtual bool RunImpl() OVERRIDE; 12158537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) 12258537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) private: 12358537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) void ErrorCallback(const std::string& error_name, 12458537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) const scoped_ptr<base::DictionaryValue> error_data); 12558537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) void ResultCallback(const std::string& guid); 12658537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateCreateNetworkFunction); 12758537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)}; 12858537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) 1292a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Implements the chrome.networkingPrivate.getVisibleNetworks method. 1302a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)class NetworkingPrivateGetVisibleNetworksFunction 131f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) : public ChromeAsyncExtensionFunction { 1322a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) public: 1332a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) NetworkingPrivateGetVisibleNetworksFunction() {} 1342a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) DECLARE_EXTENSION_FUNCTION("networkingPrivate.getVisibleNetworks", 1352a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) NETWORKINGPRIVATE_GETVISIBLENETWORKS); 1362a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 1372a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) protected: 1382a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) virtual ~NetworkingPrivateGetVisibleNetworksFunction(); 1392a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 140f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) // AsyncExtensionFunction overrides. 1412a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) virtual bool RunImpl() OVERRIDE; 1422a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 1432a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) private: 144f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) void ResultCallback(const base::ListValue& network_list); 145f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 1462a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateGetVisibleNetworksFunction); 1472a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}; 1482a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 1498bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles)// Implements the chrome.networkingPrivate.getEnabledNetworkTypes method. 1508bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles)class NetworkingPrivateGetEnabledNetworkTypesFunction 1511e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) : public ChromeSyncExtensionFunction { 1528bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) public: 1538bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) NetworkingPrivateGetEnabledNetworkTypesFunction() {} 1548bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) DECLARE_EXTENSION_FUNCTION("networkingPrivate.getEnabledNetworkTypes", 1558bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) NETWORKINGPRIVATE_GETENABLEDNETWORKTYPES); 1568bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) 1578bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) protected: 1588bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) virtual ~NetworkingPrivateGetEnabledNetworkTypesFunction(); 1598bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) 1608bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) // SyncExtensionFunction overrides. 1618bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) virtual bool RunImpl() OVERRIDE; 1628bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) 1638bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) private: 1648bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateGetEnabledNetworkTypesFunction); 1658bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles)}; 1668bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) 1678bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles)// Implements the chrome.networkingPrivate.enableNetworkType method. 1688bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles)class NetworkingPrivateEnableNetworkTypeFunction 1691e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) : public ChromeSyncExtensionFunction { 1708bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) public: 1718bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) NetworkingPrivateEnableNetworkTypeFunction() {} 1728bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) DECLARE_EXTENSION_FUNCTION("networkingPrivate.enableNetworkType", 1738bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) NETWORKINGPRIVATE_ENABLENETWORKTYPE); 1748bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) 1758bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) protected: 1768bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) virtual ~NetworkingPrivateEnableNetworkTypeFunction(); 1778bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) 1788bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) // SyncExtensionFunction overrides. 1798bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) virtual bool RunImpl() OVERRIDE; 1808bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) 1818bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) private: 1828bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateEnableNetworkTypeFunction); 1838bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles)}; 1848bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) 1858bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles)// Implements the chrome.networkingPrivate.disableNetworkType method. 1868bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles)class NetworkingPrivateDisableNetworkTypeFunction 1871e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) : public ChromeSyncExtensionFunction { 1888bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) public: 1898bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) NetworkingPrivateDisableNetworkTypeFunction() {} 1908bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) DECLARE_EXTENSION_FUNCTION("networkingPrivate.disableNetworkType", 1918bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) NETWORKINGPRIVATE_DISABLENETWORKTYPE); 1928bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) 1938bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) protected: 1948bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) virtual ~NetworkingPrivateDisableNetworkTypeFunction(); 1958bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) 1968bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) // SyncExtensionFunction overrides. 1978bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) virtual bool RunImpl() OVERRIDE; 1988bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) 1998bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) private: 2008bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateDisableNetworkTypeFunction); 2018bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles)}; 2028bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) 203c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)// Implements the chrome.networkingPrivate.requestNetworkScan method. 204c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)class NetworkingPrivateRequestNetworkScanFunction 2051e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) : public ChromeSyncExtensionFunction { 206c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) public: 207c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) NetworkingPrivateRequestNetworkScanFunction() {} 208c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) DECLARE_EXTENSION_FUNCTION("networkingPrivate.requestNetworkScan", 209c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) NETWORKINGPRIVATE_REQUESTNETWORKSCAN); 210c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) 211c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) protected: 212c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) virtual ~NetworkingPrivateRequestNetworkScanFunction(); 213c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) 214c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) // SyncExtensionFunction overrides. 215c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) virtual bool RunImpl() OVERRIDE; 216c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) 217c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) private: 218c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateRequestNetworkScanFunction); 219c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)}; 220c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) 221c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) 2222a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Implements the chrome.networkingPrivate.startConnect method. 2231e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)class NetworkingPrivateStartConnectFunction 2241e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) : public ChromeAsyncExtensionFunction { 2252a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) public: 2262a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) NetworkingPrivateStartConnectFunction() {} 2272a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) DECLARE_EXTENSION_FUNCTION("networkingPrivate.startConnect", 2282a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) NETWORKINGPRIVATE_STARTCONNECT); 2292a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 2302a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) protected: 2312a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) virtual ~NetworkingPrivateStartConnectFunction(); 2322a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 2332a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) // AsyncExtensionFunction overrides. 2342a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) virtual bool RunImpl() OVERRIDE; 2352a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 2362a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) private: 2372a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) // Called when the request to connect succeeds. Doesn't mean that the connect 2382a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) // itself succeeded, just that the request did. 2392a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) void ConnectionStartSuccess(); 2402a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 2412a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) void ConnectionStartFailed( 2422a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const std::string& error_name, 2432a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const scoped_ptr<base::DictionaryValue> error_data); 2442a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 2452a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateStartConnectFunction); 2462a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}; 2472a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 2482a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Implements the chrome.networkingPrivate.startDisconnect method. 2492a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)class NetworkingPrivateStartDisconnectFunction 2501e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) : public ChromeAsyncExtensionFunction { 2512a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) public: 2522a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) NetworkingPrivateStartDisconnectFunction() {} 2532a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) DECLARE_EXTENSION_FUNCTION("networkingPrivate.startDisconnect", 2542a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) NETWORKINGPRIVATE_STARTDISCONNECT); 2552a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 2562a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) protected: 2572a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) virtual ~NetworkingPrivateStartDisconnectFunction(); 2582a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 2592a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) // AsyncExtensionFunction overrides. 2602a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) virtual bool RunImpl() OVERRIDE; 2612a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 2622a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) private: 2632a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) // Called when the request to disconnect succeeds. Doesn't mean that the 2642a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) // disconnect itself succeeded, just that the request did. 2652a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) void DisconnectionStartSuccess(); 2662a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 2672a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) void DisconnectionStartFailed( 2682a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const std::string& error_name, 2692a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const scoped_ptr<base::DictionaryValue> error_data); 2702a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 2712a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateStartDisconnectFunction); 2722a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}; 2732a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 2742a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Implements the chrome.networkingPrivate.verifyDestination method. 2752a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)class NetworkingPrivateVerifyDestinationFunction 2761e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) : public ChromeAsyncExtensionFunction { 2772a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) public: 2782a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) NetworkingPrivateVerifyDestinationFunction() {} 2792a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) DECLARE_EXTENSION_FUNCTION("networkingPrivate.verifyDestination", 2802a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) NETWORKINGPRIVATE_VERIFYDESTINATION); 2812a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 2822a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) protected: 2832a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) virtual ~NetworkingPrivateVerifyDestinationFunction(); 2842a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 2852a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) // AsyncExtensionFunction overrides. 2862a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) virtual bool RunImpl() OVERRIDE; 2872a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 2882a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) void ResultCallback(bool result); 2892a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) void ErrorCallback(const std::string& error_name, const std::string& error); 2902a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 2912a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) private: 2922a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateVerifyDestinationFunction); 2932a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}; 2942a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 2952a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Implements the chrome.networkingPrivate.verifyAndEncryptCredentials method. 2962a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)class NetworkingPrivateVerifyAndEncryptCredentialsFunction 2971e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) : public ChromeAsyncExtensionFunction { 2982a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) public: 2992a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) NetworkingPrivateVerifyAndEncryptCredentialsFunction() {} 3002a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) DECLARE_EXTENSION_FUNCTION("networkingPrivate.verifyAndEncryptCredentials", 3012a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) NETWORKINGPRIVATE_VERIFYANDENCRYPTCREDENTIALS); 3022a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 3032a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) protected: 3042a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) virtual ~NetworkingPrivateVerifyAndEncryptCredentialsFunction(); 3052a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 3062a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) // AsyncExtensionFunction overrides. 3072a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) virtual bool RunImpl() OVERRIDE; 3082a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 3092a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) void ResultCallback(const std::string& result); 3102a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) void ErrorCallback(const std::string& error_name, const std::string& error); 3112a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 3122a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) private: 3132a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) DISALLOW_COPY_AND_ASSIGN( 3142a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) NetworkingPrivateVerifyAndEncryptCredentialsFunction); 3152a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}; 3162a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 3172a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Implements the chrome.networkingPrivate.verifyAndEncryptData method. 3182a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)class NetworkingPrivateVerifyAndEncryptDataFunction 3191e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) : public ChromeAsyncExtensionFunction { 3202a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) public: 3212a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) NetworkingPrivateVerifyAndEncryptDataFunction() {} 3222a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) DECLARE_EXTENSION_FUNCTION("networkingPrivate.verifyAndEncryptData", 3232a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) NETWORKINGPRIVATE_VERIFYANDENCRYPTDATA); 3242a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 3252a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) protected: 3262a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) virtual ~NetworkingPrivateVerifyAndEncryptDataFunction(); 3272a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 3282a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) // AsyncExtensionFunction overrides. 3292a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) virtual bool RunImpl() OVERRIDE; 3302a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 3312a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) void ResultCallback(const std::string& result); 3322a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) void ErrorCallback(const std::string& error_name, const std::string& error); 3332a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 3342a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) private: 3352a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateVerifyAndEncryptDataFunction); 3362a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}; 3372a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 3385d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// Implements the chrome.networkingPrivate.setWifiTDLSEnabledState method. 3395d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)class NetworkingPrivateSetWifiTDLSEnabledStateFunction 3405d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) : public ChromeAsyncExtensionFunction { 3415d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) public: 3425d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) NetworkingPrivateSetWifiTDLSEnabledStateFunction() {} 3435d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) DECLARE_EXTENSION_FUNCTION("networkingPrivate.setWifiTDLSEnabledState", 3445d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) NETWORKINGPRIVATE_SETWIFITDLSENABLEDSTATE); 3455d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 3465d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) protected: 3475d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) virtual ~NetworkingPrivateSetWifiTDLSEnabledStateFunction(); 3485d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 3495d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // AsyncExtensionFunction overrides. 3505d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) virtual bool RunImpl() OVERRIDE; 3515d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 3525d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) void Success(const std::string& result); 3535d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) void Failure(const std::string& error_name, 3545d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) scoped_ptr<base::DictionaryValue> error_data); 3555d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 3565d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) private: 3575d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateSetWifiTDLSEnabledStateFunction); 3585d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}; 3595d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 3605d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// Implements the chrome.networkingPrivate.getWifiTDLSStatus method. 3615d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)class NetworkingPrivateGetWifiTDLSStatusFunction 3625d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) : public ChromeAsyncExtensionFunction { 3635d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) public: 3645d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) NetworkingPrivateGetWifiTDLSStatusFunction() {} 3655d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) DECLARE_EXTENSION_FUNCTION("networkingPrivate.getWifiTDLSStatus", 3665d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) NETWORKINGPRIVATE_GETWIFITDLSSTATUS); 3675d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 3685d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) protected: 3695d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) virtual ~NetworkingPrivateGetWifiTDLSStatusFunction(); 3705d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 3715d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // AsyncExtensionFunction overrides. 3725d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) virtual bool RunImpl() OVERRIDE; 3735d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 3745d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) void Success(const std::string& result); 3755d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) void Failure(const std::string& error_name, 3765d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) scoped_ptr<base::DictionaryValue> error_data); 3775d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 3785d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) private: 3795d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateGetWifiTDLSStatusFunction); 3805d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}; 3815d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 382c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdochclass NetworkingPrivateGetCaptivePortalStatusFunction 383c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch : public ChromeAsyncExtensionFunction { 384c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch public: 385c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch NetworkingPrivateGetCaptivePortalStatusFunction() {} 386c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch DECLARE_EXTENSION_FUNCTION("networkingPrivate.getCaptivePortalStatus", 387c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch NETWORKINGPRIVATE_GETCAPTIVEPORTALSTATUS); 388c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch 389c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch // AsyncExtensionFunction overrides. 390c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch virtual bool RunImpl() OVERRIDE; 391c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch 392c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch protected: 393c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch virtual ~NetworkingPrivateGetCaptivePortalStatusFunction(); 394c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch 395c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch private: 396c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateGetCaptivePortalStatusFunction); 397c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch}; 398c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch 39958e6fbe4ee35d65e14b626c557d37565bf8ad179Ben Murdoch#endif // CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_API_H_ 400