| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H_ | 5 #ifndef CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H_ |
| 6 #define CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H_ | 6 #define CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 | 174 |
| 175 // AutomationMessageSender implementation. | 175 // AutomationMessageSender implementation. |
| 176 virtual bool Send(IPC::Message* message) WARN_UNUSED_RESULT; | 176 virtual bool Send(IPC::Message* message) WARN_UNUSED_RESULT; |
| 177 virtual bool Send(IPC::Message* message, int timeout_ms) WARN_UNUSED_RESULT; | 177 virtual bool Send(IPC::Message* message, int timeout_ms) WARN_UNUSED_RESULT; |
| 178 | 178 |
| 179 // Wrapper over AutomationHandleTracker::InvalidateHandle. Receives the | 179 // Wrapper over AutomationHandleTracker::InvalidateHandle. Receives the |
| 180 // message from AutomationProxy, unpacks the messages and routes that call to | 180 // message from AutomationProxy, unpacks the messages and routes that call to |
| 181 // the tracker. | 181 // the tracker. |
| 182 virtual void InvalidateHandle(const IPC::Message& message); | 182 virtual void InvalidateHandle(const IPC::Message& message); |
| 183 | 183 |
| 184 // Creates a tab that can hosted in an external process. The function | |
| 185 // returns a TabProxy representing the tab as well as a window handle | |
| 186 // that can be reparented in another process. | |
| 187 scoped_refptr<TabProxy> CreateExternalTab( | |
| 188 const ExternalTabSettings& settings, | |
| 189 gfx::NativeWindow* external_tab_container, | |
| 190 gfx::NativeWindow* tab); | |
| 191 | |
| 192 base::TimeDelta action_timeout() const { | 184 base::TimeDelta action_timeout() const { |
| 193 return action_timeout_; | 185 return action_timeout_; |
| 194 } | 186 } |
| 195 | 187 |
| 196 // Sets the timeout for subsequent automation calls. | 188 // Sets the timeout for subsequent automation calls. |
| 197 void set_action_timeout(base::TimeDelta timeout) { | 189 void set_action_timeout(base::TimeDelta timeout) { |
| 198 DCHECK(timeout <= base::TimeDelta::FromMinutes(10)) | 190 DCHECK(timeout <= base::TimeDelta::FromMinutes(10)) |
| 199 << "10+ min of automation timeout " | 191 << "10+ min of automation timeout " |
| 200 "can make the test hang and be killed by buildbot"; | 192 "can make the test hang and be killed by buildbot"; |
| 201 action_timeout_ = timeout; | 193 action_timeout_ = timeout; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 | 251 |
| 260 // Delay to let the browser execute the command. | 252 // Delay to let the browser execute the command. |
| 261 base::TimeDelta action_timeout_; | 253 base::TimeDelta action_timeout_; |
| 262 | 254 |
| 263 base::PlatformThreadId listener_thread_id_; | 255 base::PlatformThreadId listener_thread_id_; |
| 264 | 256 |
| 265 DISALLOW_COPY_AND_ASSIGN(AutomationProxy); | 257 DISALLOW_COPY_AND_ASSIGN(AutomationProxy); |
| 266 }; | 258 }; |
| 267 | 259 |
| 268 #endif // CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H_ | 260 #endif // CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H_ |
| OLD | NEW |