| 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/tab_proxy.h" | 5 #include "chrome/test/automation/tab_proxy.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "chrome/common/json_value_serializer.h" | 10 #include "chrome/common/json_value_serializer.h" |
| (...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 if (!is_valid()) | 658 if (!is_valid()) |
| 659 return false; | 659 return false; |
| 660 | 660 |
| 661 bool succeeded = false; | 661 bool succeeded = false; |
| 662 sender_->Send(new AutomationMsg_OverrideEncoding(0, handle_, encoding, | 662 sender_->Send(new AutomationMsg_OverrideEncoding(0, handle_, encoding, |
| 663 &succeeded)); | 663 &succeeded)); |
| 664 return succeeded; | 664 return succeeded; |
| 665 } | 665 } |
| 666 | 666 |
| 667 #if defined(OS_WIN) | 667 #if defined(OS_WIN) |
| 668 void TabProxy::Reposition(HWND window, HWND window_insert_after, int left, | |
| 669 int top, int width, int height, int flags, | |
| 670 HWND parent_window) { | |
| 671 | |
| 672 IPC::Reposition_Params params = {0}; | |
| 673 params.window = window; | |
| 674 params.window_insert_after = window_insert_after; | |
| 675 params.left = left; | |
| 676 params.top = top; | |
| 677 params.width = width; | |
| 678 params.height = height; | |
| 679 params.flags = flags; | |
| 680 params.set_parent = (::IsWindow(parent_window) ? true : false); | |
| 681 params.parent_window = parent_window; | |
| 682 sender_->Send(new AutomationMsg_TabReposition(0, handle_, params)); | |
| 683 } | |
| 684 | |
| 685 void TabProxy::SendContextMenuCommand(int selected_command) { | 668 void TabProxy::SendContextMenuCommand(int selected_command) { |
| 686 sender_->Send(new AutomationMsg_ForwardContextMenuCommandToChrome( | 669 sender_->Send(new AutomationMsg_ForwardContextMenuCommandToChrome( |
| 687 0, handle_, selected_command)); | 670 0, handle_, selected_command)); |
| 688 } | 671 } |
| 689 | |
| 690 #endif // defined(OS_WIN) | 672 #endif // defined(OS_WIN) |
| 691 | 673 |
| 692 void TabProxy::SelectAll() { | 674 void TabProxy::SelectAll() { |
| 693 sender_->Send(new AutomationMsg_SelectAll(0, handle_)); | 675 sender_->Send(new AutomationMsg_SelectAll(0, handle_)); |
| 694 } | 676 } |
| 695 | 677 |
| 696 void TabProxy::Cut() { | 678 void TabProxy::Cut() { |
| 697 sender_->Send(new AutomationMsg_Cut(0, handle_)); | 679 sender_->Send(new AutomationMsg_Cut(0, handle_)); |
| 698 } | 680 } |
| 699 | 681 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 722 AutoLock lock(list_lock_); | 704 AutoLock lock(list_lock_); |
| 723 observers_list_.RemoveObserver(observer); | 705 observers_list_.RemoveObserver(observer); |
| 724 } | 706 } |
| 725 | 707 |
| 726 // Called on Channel background thread, if TabMessages filter is installed. | 708 // Called on Channel background thread, if TabMessages filter is installed. |
| 727 void TabProxy::OnMessageReceived(const IPC::Message& message) { | 709 void TabProxy::OnMessageReceived(const IPC::Message& message) { |
| 728 AutoLock lock(list_lock_); | 710 AutoLock lock(list_lock_); |
| 729 FOR_EACH_OBSERVER(TabProxyDelegate, observers_list_, | 711 FOR_EACH_OBSERVER(TabProxyDelegate, observers_list_, |
| 730 OnMessageReceived(this, message)); | 712 OnMessageReceived(this, message)); |
| 731 } | 713 } |
| OLD | NEW |