| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/test/automation/automation_proxy.h" | 5 #include "chrome/test/automation/automation_proxy.h" |
| 6 | 6 |
| 7 #include <gtest/gtest.h> | 7 #include <gtest/gtest.h> |
| 8 | 8 |
| 9 #include <sstream> | 9 #include <sstream> |
| 10 | 10 |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 bool succeeded = | 491 bool succeeded = |
| 492 Send(new AutomationMsg_CreateExternalTab(settings, | 492 Send(new AutomationMsg_CreateExternalTab(settings, |
| 493 external_tab_container, | 493 external_tab_container, |
| 494 tab, | 494 tab, |
| 495 &handle, | 495 &handle, |
| 496 &session_id)); | 496 &session_id)); |
| 497 if (!succeeded) { | 497 if (!succeeded) { |
| 498 return NULL; | 498 return NULL; |
| 499 } | 499 } |
| 500 | 500 |
| 501 #if defined(OS_WIN) | 501 #if defined(OS_WIN) && !defined(USE_AURA) |
| 502 DCHECK(IsWindow(*external_tab_container)); | 502 DCHECK(IsWindow(*external_tab_container)); |
| 503 #else // defined(OS_WIN) | 503 #else // defined(OS_WIN) |
| 504 DCHECK(*external_tab_container); | 504 DCHECK(*external_tab_container); |
| 505 #endif // defined(OS_WIN) | 505 #endif // defined(OS_WIN) |
| 506 DCHECK(tracker_->GetResource(handle) == NULL); | 506 DCHECK(tracker_->GetResource(handle) == NULL); |
| 507 return new TabProxy(this, tracker_.get(), handle); | 507 return new TabProxy(this, tracker_.get(), handle); |
| 508 } | 508 } |
| 509 | 509 |
| 510 template <class T> scoped_refptr<T> AutomationProxy::ProxyObjectFromHandle( | 510 template <class T> scoped_refptr<T> AutomationProxy::ProxyObjectFromHandle( |
| 511 int handle) { | 511 int handle) { |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 } | 589 } |
| 590 | 590 |
| 591 bool AutomationProxy::SendJSONRequest(const std::string& request, | 591 bool AutomationProxy::SendJSONRequest(const std::string& request, |
| 592 int timeout_ms, | 592 int timeout_ms, |
| 593 std::string* response) { | 593 std::string* response) { |
| 594 bool result = false; | 594 bool result = false; |
| 595 if (!SendAutomationJSONRequest(this, request, timeout_ms, response, &result)) | 595 if (!SendAutomationJSONRequest(this, request, timeout_ms, response, &result)) |
| 596 return false; | 596 return false; |
| 597 return result; | 597 return result; |
| 598 } | 598 } |
| OLD | NEW |