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/browser_proxy.h" | 5 #include "chrome/test/automation/browser_proxy.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 return false; | 340 return false; |
341 | 341 |
342 bool success = false; | 342 bool success = false; |
343 if (AutomationMsg_WindowExecuteCommandResponse::Read(response, &success)) | 343 if (AutomationMsg_WindowExecuteCommandResponse::Read(response, &success)) |
344 return success; | 344 return success; |
345 | 345 |
346 // We failed to deserialize the returned value. | 346 // We failed to deserialize the returned value. |
347 return false; | 347 return false; |
348 } | 348 } |
349 | 349 |
| 350 bool BrowserProxy::GetBookmarkBarVisibility(bool* is_visible, |
| 351 bool* is_animating) { |
| 352 if (!is_valid()) |
| 353 return false; |
| 354 |
| 355 if (!is_visible || !is_animating) { |
| 356 NOTREACHED(); |
| 357 return false; |
| 358 } |
| 359 |
| 360 IPC::Message* response = NULL; |
| 361 bool succeeded = sender_->SendAndWaitForResponse( |
| 362 new AutomationMsg_BookmarkBarVisibilityRequest(0, handle_), |
| 363 &response, |
| 364 AutomationMsg_BookmarkBarVisibilityResponse::ID); |
| 365 |
| 366 if (!succeeded) |
| 367 return false; |
| 368 |
| 369 void* iter = NULL; |
| 370 response->ReadBool(&iter, is_visible); |
| 371 response->ReadBool(&iter, is_animating); |
| 372 delete response; |
| 373 return true; |
| 374 } |
OLD | NEW |