| 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/platform_thread.h" | 10 #include "base/platform_thread.h" |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 } | 391 } |
| 392 | 392 |
| 393 bool BrowserProxy::SetShelfVisible(bool is_visible) { | 393 bool BrowserProxy::SetShelfVisible(bool is_visible) { |
| 394 if (!is_valid()) | 394 if (!is_valid()) |
| 395 return false; | 395 return false; |
| 396 | 396 |
| 397 return sender_->Send(new AutomationMsg_SetShelfVisibility(0, handle_, | 397 return sender_->Send(new AutomationMsg_SetShelfVisibility(0, handle_, |
| 398 is_visible)); | 398 is_visible)); |
| 399 } | 399 } |
| 400 | 400 |
| 401 bool BrowserProxy::WaitForDownloadShelfVisibilityChange(bool visibility) { |
| 402 if (!is_valid()) |
| 403 return false; |
| 404 |
| 405 bool result = false; |
| 406 |
| 407 if (!sender_->Send(new AutomationMsg_WaitForDownloadShelfVisibilityChange( |
| 408 0, handle_, visibility, &result))) |
| 409 return false; |
| 410 |
| 411 return result; |
| 412 } |
| 413 |
| 401 bool BrowserProxy::SetIntPreference(const std::wstring& name, int value) { | 414 bool BrowserProxy::SetIntPreference(const std::wstring& name, int value) { |
| 402 if (!is_valid()) | 415 if (!is_valid()) |
| 403 return false; | 416 return false; |
| 404 | 417 |
| 405 bool result = false; | 418 bool result = false; |
| 406 | 419 |
| 407 sender_->Send(new AutomationMsg_SetIntPreference(0, handle_, name, value, | 420 sender_->Send(new AutomationMsg_SetIntPreference(0, handle_, name, value, |
| 408 &result)); | 421 &result)); |
| 409 return result; | 422 return result; |
| 410 } | 423 } |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 std::string* response) { | 600 std::string* response) { |
| 588 if (!is_valid()) | 601 if (!is_valid()) |
| 589 return false; | 602 return false; |
| 590 | 603 |
| 591 bool result = false; | 604 bool result = false; |
| 592 return sender_->Send(new AutomationMsg_SendJSONRequest(0, handle_, | 605 return sender_->Send(new AutomationMsg_SendJSONRequest(0, handle_, |
| 593 request, response, | 606 request, response, |
| 594 &result)); | 607 &result)); |
| 595 return result; | 608 return result; |
| 596 } | 609 } |
| OLD | NEW |