Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(536)

Side by Side Diff: chrome/test/automation/automation_proxy.h

Issue 5998006: Clean up Automation and Chrome Frame IPC code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 13 matching lines...) Expand all
24 #include "gfx/native_widget_types.h" 24 #include "gfx/native_widget_types.h"
25 #include "googleurl/src/gurl.h" 25 #include "googleurl/src/gurl.h"
26 #include "ipc/ipc_channel_proxy.h" 26 #include "ipc/ipc_channel_proxy.h"
27 #include "ipc/ipc_message.h" 27 #include "ipc/ipc_message.h"
28 #include "ipc/ipc_sync_channel.h" 28 #include "ipc/ipc_sync_channel.h"
29 29
30 class BrowserProxy; 30 class BrowserProxy;
31 class ExtensionProxy; 31 class ExtensionProxy;
32 class TabProxy; 32 class TabProxy;
33 class WindowProxy; 33 class WindowProxy;
34
35 namespace IPC {
36 struct ExternalTabSettings; 34 struct ExternalTabSettings;
37 }
38 35
39 // This is an interface that AutomationProxy-related objects can use to 36 // This is an interface that AutomationProxy-related objects can use to
40 // access the message-sending abilities of the Proxy. 37 // access the message-sending abilities of the Proxy.
41 class AutomationMessageSender : public IPC::Message::Sender { 38 class AutomationMessageSender : public IPC::Message::Sender {
42 public: 39 public:
43 // Sends a message synchronously; it doesn't return until a response has been 40 // Sends a message synchronously; it doesn't return until a response has been
44 // received or a timeout has expired. 41 // received or a timeout has expired.
45 // 42 //
46 // The function returns true if a response is received, and returns false if 43 // The function returns true if a response is received, and returns false if
47 // there is a failure or timeout (in milliseconds). 44 // there is a failure or timeout (in milliseconds).
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 218
222 // Wrapper over AutomationHandleTracker::InvalidateHandle. Receives the 219 // Wrapper over AutomationHandleTracker::InvalidateHandle. Receives the
223 // message from AutomationProxy, unpacks the messages and routes that call to 220 // message from AutomationProxy, unpacks the messages and routes that call to
224 // the tracker. 221 // the tracker.
225 virtual void InvalidateHandle(const IPC::Message& message); 222 virtual void InvalidateHandle(const IPC::Message& message);
226 223
227 // Creates a tab that can hosted in an external process. The function 224 // Creates a tab that can hosted in an external process. The function
228 // returns a TabProxy representing the tab as well as a window handle 225 // returns a TabProxy representing the tab as well as a window handle
229 // that can be reparented in another process. 226 // that can be reparented in another process.
230 scoped_refptr<TabProxy> CreateExternalTab( 227 scoped_refptr<TabProxy> CreateExternalTab(
231 const IPC::ExternalTabSettings& settings, 228 const ExternalTabSettings& settings,
232 gfx::NativeWindow* external_tab_container, 229 gfx::NativeWindow* external_tab_container,
233 gfx::NativeWindow* tab); 230 gfx::NativeWindow* tab);
234 231
235 int command_execution_timeout_ms() const { 232 int command_execution_timeout_ms() const {
236 return static_cast<int>(command_execution_timeout_.InMilliseconds()); 233 return static_cast<int>(command_execution_timeout_.InMilliseconds());
237 } 234 }
238 235
239 // Sets the timeout for subsequent automation calls. 236 // Sets the timeout for subsequent automation calls.
240 void set_command_execution_timeout_ms(int timeout_ms) { 237 void set_command_execution_timeout_ms(int timeout_ms) {
241 DCHECK(timeout_ms <= 10 * 60 * 1000 ) << "10+ min of automation timeout " 238 DCHECK(timeout_ms <= 10 * 60 * 1000 ) << "10+ min of automation timeout "
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 296
300 // Delay to let the browser execute the command. 297 // Delay to let the browser execute the command.
301 base::TimeDelta command_execution_timeout_; 298 base::TimeDelta command_execution_timeout_;
302 299
303 PlatformThreadId listener_thread_id_; 300 PlatformThreadId listener_thread_id_;
304 301
305 DISALLOW_COPY_AND_ASSIGN(AutomationProxy); 302 DISALLOW_COPY_AND_ASSIGN(AutomationProxy);
306 }; 303 };
307 304
308 #endif // CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H__ 305 #endif // CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H__
OLDNEW
« no previous file with comments | « chrome/test/automation/automation_handle_tracker.cc ('k') | chrome/test/automation/automation_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698