| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "chrome/test/automation/automation_proxy.h" | 5 #include "chrome/test/automation/automation_proxy.h" |
| 6 | 6 |
| 7 #include <gtest/gtest.h> | 7 #include <gtest/gtest.h> |
| 8 | 8 |
| 9 #include <sstream> | 9 #include <sstream> |
| 10 | 10 |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 | 150 |
| 151 // TODO(iyengar) | 151 // TODO(iyengar) |
| 152 // The shutdown event could be global on the same lines as the automation | 152 // The shutdown event could be global on the same lines as the automation |
| 153 // provider, where we use the shutdown event provided by the chrome browser | 153 // provider, where we use the shutdown event provided by the chrome browser |
| 154 // process. | 154 // process. |
| 155 channel_.reset(new IPC::SyncChannel( | 155 channel_.reset(new IPC::SyncChannel( |
| 156 channel_id, | 156 channel_id, |
| 157 use_named_interface ? IPC::Channel::MODE_NAMED_CLIENT | 157 use_named_interface ? IPC::Channel::MODE_NAMED_CLIENT |
| 158 : IPC::Channel::MODE_SERVER, | 158 : IPC::Channel::MODE_SERVER, |
| 159 this, // we are the listener | 159 this, // we are the listener |
| 160 thread_->message_loop(), | 160 thread_->message_loop_proxy(), |
| 161 true, | 161 true, |
| 162 shutdown_event_.get())); | 162 shutdown_event_.get())); |
| 163 channel_->AddFilter(new AutomationMessageFilter(this)); | 163 channel_->AddFilter(new AutomationMessageFilter(this)); |
| 164 } | 164 } |
| 165 | 165 |
| 166 void AutomationProxy::InitializeHandleTracker() { | 166 void AutomationProxy::InitializeHandleTracker() { |
| 167 tracker_.reset(new AutomationHandleTracker()); | 167 tracker_.reset(new AutomationHandleTracker()); |
| 168 } | 168 } |
| 169 | 169 |
| 170 AutomationLaunchResult AutomationProxy::WaitForAppLaunch() { | 170 AutomationLaunchResult AutomationProxy::WaitForAppLaunch() { |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 } | 553 } |
| 554 | 554 |
| 555 bool AutomationProxy::SendJSONRequest(const std::string& request, | 555 bool AutomationProxy::SendJSONRequest(const std::string& request, |
| 556 int timeout_ms, | 556 int timeout_ms, |
| 557 std::string* response) { | 557 std::string* response) { |
| 558 bool result = false; | 558 bool result = false; |
| 559 if (!SendAutomationJSONRequest(this, request, timeout_ms, response, &result)) | 559 if (!SendAutomationJSONRequest(this, request, timeout_ms, response, &result)) |
| 560 return false; | 560 return false; |
| 561 return result; | 561 return result; |
| 562 } | 562 } |
| OLD | NEW |