summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation/automation_provider_observers.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/automation/automation_provider_observers.h')
-rw-r--r--chrome/browser/automation/automation_provider_observers.h33
1 files changed, 29 insertions, 4 deletions
diff --git a/chrome/browser/automation/automation_provider_observers.h b/chrome/browser/automation/automation_provider_observers.h
index 7579496..0a9cd5e 100644
--- a/chrome/browser/automation/automation_provider_observers.h
+++ b/chrome/browser/automation/automation_provider_observers.h
@@ -813,8 +813,8 @@ class NetworkScanObserver
virtual void OnNetworkManagerChanged(chromeos::NetworkLibrary* obj);
private:
- AutomationProvider* automation_;
- IPC::Message* reply_message_;
+ base::WeakPtr<AutomationProvider> automation_;
+ scoped_ptr<IPC::Message> reply_message_;
DISALLOW_COPY_AND_ASSIGN(NetworkScanObserver);
};
@@ -836,8 +836,8 @@ class NetworkConnectObserver
virtual void OnNetworkManagerChanged(chromeos::NetworkLibrary* obj);
private:
- AutomationProvider* automation_;
- IPC::Message* reply_message_;
+ base::WeakPtr<AutomationProvider> automation_;
+ scoped_ptr<IPC::Message> reply_message_;
DISALLOW_COPY_AND_ASSIGN(NetworkConnectObserver);
};
@@ -860,6 +860,31 @@ class ServicePathConnectObserver : public NetworkConnectObserver {
};
// Waits for a connection success or failure for the specified
+// virtual network and returns the status to the automation provider.
+class VirtualConnectObserver
+ : public chromeos::NetworkLibrary::NetworkManagerObserver {
+ public:
+ VirtualConnectObserver(AutomationProvider* automation,
+ IPC::Message* reply_message,
+ const std::string& service_name);
+
+ virtual ~VirtualConnectObserver();
+
+ // NetworkLibrary::NetworkManagerObserver implementation.
+ virtual void OnNetworkManagerChanged(chromeos::NetworkLibrary* cros);
+
+ private:
+ virtual chromeos::VirtualNetwork* GetVirtualNetwork(
+ const chromeos::NetworkLibrary* cros);
+
+ base::WeakPtr<AutomationProvider> automation_;
+ scoped_ptr<IPC::Message> reply_message_;
+ std::string service_name_;
+
+ DISALLOW_COPY_AND_ASSIGN(VirtualConnectObserver);
+};
+
+// Waits for a connection success or failure for the specified
// network and returns the status to the automation provider.
class SSIDConnectObserver : public NetworkConnectObserver {
public: