diff options
Diffstat (limited to 'chrome/test/automation/automation_proxy.cc')
-rw-r--r-- | chrome/test/automation/automation_proxy.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/test/automation/automation_proxy.cc b/chrome/test/automation/automation_proxy.cc index 07e5387..6d98f0d 100644 --- a/chrome/test/automation/automation_proxy.cc +++ b/chrome/test/automation/automation_proxy.cc @@ -325,6 +325,10 @@ bool AutomationProxy::SetFilteredInet(bool enabled) { return Send(new AutomationMsg_SetFilteredInet(0, enabled)); } +void AutomationProxy::Disconnect() { + channel_.reset(); +} + void AutomationProxy::OnMessageReceived(const IPC::Message& msg) { // This won't get called unless AutomationProxy is run from // inside a message loop. @@ -491,6 +495,15 @@ AutocompleteEditProxy* AutomationProxy::GetAutocompleteEditForBrowser( autocomplete_edit_handle); } +bool AutomationProxy::Send(IPC::Message* message) { + if (channel_.get()) + return channel_->Send(message); + + DLOG(WARNING) << "Channel has been closed; dropping message!"; + delete message; + return false; +} + bool AutomationProxy::SendAndWaitForResponse(IPC::Message* request, IPC::Message** response, int response_type) { |