| 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 "chrome/test/automation/autocomplete_edit_proxy.h" | 5 #include "chrome/test/automation/autocomplete_edit_proxy.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "chrome/test/automation/automation_constants.h" | 9 #include "chrome/test/automation/automation_constants.h" |
| 10 #include "chrome/test/automation/automation_messages.h" | 10 #include "chrome/test/automation/automation_messages.h" |
| 11 #include "chrome/test/automation/automation_proxy.h" | 11 #include "chrome/test/automation/automation_proxy.h" |
| 12 | 12 |
| 13 using base::TimeDelta; |
| 14 using base::TimeTicks; |
| 15 |
| 13 bool AutocompleteEditProxy::GetText(std::wstring* text) const { | 16 bool AutocompleteEditProxy::GetText(std::wstring* text) const { |
| 14 if (!is_valid()) | 17 if (!is_valid()) |
| 15 return false; | 18 return false; |
| 16 if (!text) { | 19 if (!text) { |
| 17 NOTREACHED(); | 20 NOTREACHED(); |
| 18 return false; | 21 return false; |
| 19 } | 22 } |
| 20 | 23 |
| 21 IPC::Message* response = NULL; | 24 IPC::Message* response = NULL; |
| 22 if (!sender_->SendAndWaitForResponse( | 25 if (!sender_->SendAndWaitForResponse( |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 | 106 |
| 104 Tuple2<bool, Matches> returned_result; | 107 Tuple2<bool, Matches> returned_result; |
| 105 if (!AutomationMsg_AutocompleteEditGetMatchesResponse::Read( | 108 if (!AutomationMsg_AutocompleteEditGetMatchesResponse::Read( |
| 106 response, &returned_result) || !returned_result.a) | 109 response, &returned_result) || !returned_result.a) |
| 107 return false; | 110 return false; |
| 108 | 111 |
| 109 *matches = returned_result.b; | 112 *matches = returned_result.b; |
| 110 return true; | 113 return true; |
| 111 } | 114 } |
| 112 | 115 |
| OLD | NEW |