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 // This implements a browser-side endpoint for UI automation activity. | 5 // This implements a browser-side endpoint for UI automation activity. |
6 // The client-side endpoint is implemented by AutomationProxy. | 6 // The client-side endpoint is implemented by AutomationProxy. |
7 // The entire lifetime of this object should be contained within that of | 7 // The entire lifetime of this object should be contained within that of |
8 // the BrowserProcess, and in particular the NotificationService that's | 8 // the BrowserProcess, and in particular the NotificationService that's |
9 // hung off of it. | 9 // hung off of it. |
10 | 10 |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 | 234 |
235 private: | 235 private: |
236 // Storage for EndTracing() to resume operations after a callback. | 236 // Storage for EndTracing() to resume operations after a callback. |
237 struct TracingData { | 237 struct TracingData { |
238 std::list<std::string> trace_output; | 238 std::list<std::string> trace_output; |
239 scoped_ptr<IPC::Message> reply_message; | 239 scoped_ptr<IPC::Message> reply_message; |
240 }; | 240 }; |
241 | 241 |
242 // TraceSubscriber: | 242 // TraceSubscriber: |
243 virtual void OnEndTracingComplete() OVERRIDE; | 243 virtual void OnEndTracingComplete() OVERRIDE; |
244 virtual void OnTraceDataCollected(const std::string& trace_fragment) OVERRIDE; | 244 virtual void OnTraceDataCollected( |
| 245 const scoped_refptr<base::RefCountedString>& trace_fragment) OVERRIDE; |
245 | 246 |
246 void OnUnhandledMessage(const IPC::Message& message); | 247 void OnUnhandledMessage(const IPC::Message& message); |
247 | 248 |
248 // Clear and reinitialize the automation IPC channel. | 249 // Clear and reinitialize the automation IPC channel. |
249 bool ReinitializeChannel(); | 250 bool ReinitializeChannel(); |
250 | 251 |
251 // IPC Message callbacks. | 252 // IPC Message callbacks. |
252 void WindowSimulateDrag(int handle, | 253 void WindowSimulateDrag(int handle, |
253 const std::vector<gfx::Point>& drag_path, | 254 const std::vector<gfx::Point>& drag_path, |
254 int flags, | 255 int flags, |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 std::string channel_id_; | 422 std::string channel_id_; |
422 | 423 |
423 // Trace data that has been collected but not flushed to the automation | 424 // Trace data that has been collected but not flushed to the automation |
424 // client. | 425 // client. |
425 TracingData tracing_data_; | 426 TracingData tracing_data_; |
426 | 427 |
427 DISALLOW_COPY_AND_ASSIGN(AutomationProvider); | 428 DISALLOW_COPY_AND_ASSIGN(AutomationProvider); |
428 }; | 429 }; |
429 | 430 |
430 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_H_ | 431 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_H_ |
OLD | NEW |