OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 // Initializes a channel for a connection to an AutomationProvider. | 64 // Initializes a channel for a connection to an AutomationProvider. |
65 // If use_named_interface is false, it will act as a client | 65 // If use_named_interface is false, it will act as a client |
66 // and connect to the named IPC socket with channel_id as its path. | 66 // and connect to the named IPC socket with channel_id as its path. |
67 // If use_named_interface is true, it will act as a server and | 67 // If use_named_interface is true, it will act as a server and |
68 // use an anonymous socketpair instead. | 68 // use an anonymous socketpair instead. |
69 void InitializeChannel(const std::string& channel_id, | 69 void InitializeChannel(const std::string& channel_id, |
70 bool use_named_interface); | 70 bool use_named_interface); |
71 | 71 |
72 // IPC callback | 72 // IPC callback |
73 virtual void OnMessageReceived(const IPC::Message& msg); | 73 virtual bool OnMessageReceived(const IPC::Message& msg); |
74 virtual void OnChannelError(); | 74 virtual void OnChannelError(); |
75 | 75 |
76 // Close the automation IPC channel. | 76 // Close the automation IPC channel. |
77 void Disconnect(); | 77 void Disconnect(); |
78 | 78 |
79 // Waits for the app to launch and the automation provider to say hello | 79 // Waits for the app to launch and the automation provider to say hello |
80 // (the app isn't fully done loading by this point). | 80 // (the app isn't fully done loading by this point). |
81 // Returns SUCCESS if the launch is successful. | 81 // Returns SUCCESS if the launch is successful. |
82 // Returns TIMEOUT if there was no response by command_execution_timeout_ | 82 // Returns TIMEOUT if there was no response by command_execution_timeout_ |
83 // Returns VERSION_MISMATCH if the automation protocol version of the | 83 // Returns VERSION_MISMATCH if the automation protocol version of the |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 | 300 |
301 // Delay to let the browser execute the command. | 301 // Delay to let the browser execute the command. |
302 base::TimeDelta command_execution_timeout_; | 302 base::TimeDelta command_execution_timeout_; |
303 | 303 |
304 PlatformThreadId listener_thread_id_; | 304 PlatformThreadId listener_thread_id_; |
305 | 305 |
306 DISALLOW_COPY_AND_ASSIGN(AutomationProxy); | 306 DISALLOW_COPY_AND_ASSIGN(AutomationProxy); |
307 }; | 307 }; |
308 | 308 |
309 #endif // CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H__ | 309 #endif // CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H__ |
OLD | NEW |