| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <sstream> | 5 #include <sstream> |
| 6 | 6 |
| 7 #include "chrome/test/automation/automation_proxy.h" | 7 #include "chrome/test/automation/automation_proxy.h" |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/ref_counted.h" | 10 #include "base/ref_counted.h" |
| 11 #include "chrome/common/ipc_message_macros.h" | 11 #include "chrome/common/ipc_message_macros.h" |
| 12 #include "chrome/test/automation/autocomplete_edit_proxy.h" | 12 #include "chrome/test/automation/autocomplete_edit_proxy.h" |
| 13 #include "chrome/test/automation/automation_constants.h" | 13 #include "chrome/test/automation/automation_constants.h" |
| 14 #include "chrome/test/automation/automation_messages.h" | 14 #include "chrome/test/automation/automation_messages.h" |
| 15 #include "chrome/test/automation/browser_proxy.h" | 15 #include "chrome/test/automation/browser_proxy.h" |
| 16 #include "chrome/test/automation/tab_proxy.h" | 16 #include "chrome/test/automation/tab_proxy.h" |
| 17 #include "chrome/test/automation/window_proxy.h" | 17 #include "chrome/test/automation/window_proxy.h" |
| 18 | 18 |
| 19 using base::TimeDelta; |
| 20 using base::TimeTicks; |
| 21 |
| 19 // This class exists to group together the data and functionality used for | 22 // This class exists to group together the data and functionality used for |
| 20 // synchronous automation requests. | 23 // synchronous automation requests. |
| 21 class AutomationRequest : | 24 class AutomationRequest : |
| 22 public base::RefCountedThreadSafe<AutomationRequest> { | 25 public base::RefCountedThreadSafe<AutomationRequest> { |
| 23 public: | 26 public: |
| 24 AutomationRequest() { | 27 AutomationRequest() { |
| 25 static int32 routing_id = 0; | 28 static int32 routing_id = 0; |
| 26 routing_id_ = ++routing_id; | 29 routing_id_ = ++routing_id; |
| 27 received_response_ = ::CreateEvent(NULL, TRUE, FALSE, NULL); | 30 received_response_ = ::CreateEvent(NULL, TRUE, FALSE, NULL); |
| 28 DCHECK(received_response_); | 31 DCHECK(received_response_); |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 (handle >= 0)) { | 552 (handle >= 0)) { |
| 550 succeeded = true; | 553 succeeded = true; |
| 551 tab_proxy = new TabProxy(this, tracker_.get(), handle); | 554 tab_proxy = new TabProxy(this, tracker_.get(), handle); |
| 552 } | 555 } |
| 553 } else { | 556 } else { |
| 554 succeeded = false; | 557 succeeded = false; |
| 555 } | 558 } |
| 556 delete response; | 559 delete response; |
| 557 return tab_proxy; | 560 return tab_proxy; |
| 558 } | 561 } |
| 559 | |
| OLD | NEW |