Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: chrome/test/automation/tab_proxy.cc

Issue 378031: Revert 31419 - Commit Issue 255057: Unit Test for Toggling of Encoding AutoDe... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/automation/tab_proxy.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 657
658 bool TabProxy::GetPageCurrentEncoding(std::string* encoding) { 658 bool TabProxy::GetPageCurrentEncoding(std::string* encoding) {
659 if (!is_valid()) 659 if (!is_valid())
660 return false; 660 return false;
661 661
662 bool succeeded = sender_->Send( 662 bool succeeded = sender_->Send(
663 new AutomationMsg_GetPageCurrentEncoding(0, handle_, encoding)); 663 new AutomationMsg_GetPageCurrentEncoding(0, handle_, encoding));
664 return succeeded; 664 return succeeded;
665 } 665 }
666 666
667 bool TabProxy::ToggleEncodingAutoDetect() {
668 if (!is_valid())
669 return false;
670
671 bool succeeded = false;
672 sender_->Send(new AutomationMsg_ToggleEncodingAutoDetect(0, handle_,
673 &succeeded));
674 return succeeded;
675 }
676
677 bool TabProxy::OverrideEncoding(const std::string& encoding) { 667 bool TabProxy::OverrideEncoding(const std::string& encoding) {
678 if (!is_valid()) 668 if (!is_valid())
679 return false; 669 return false;
680 670
681 bool succeeded = false; 671 bool succeeded = false;
682 sender_->Send(new AutomationMsg_OverrideEncoding(0, handle_, encoding, 672 sender_->Send(new AutomationMsg_OverrideEncoding(0, handle_, encoding,
683 &succeeded)); 673 &succeeded));
684 return succeeded; 674 return succeeded;
685 } 675 }
686 676
687 #if defined(OS_WIN) 677 #if defined(OS_WIN)
688 void TabProxy::Reposition(HWND window, HWND window_insert_after, int left, 678 void TabProxy::Reposition(HWND window, HWND window_insert_after, int left,
689 int top, int width, int height, int flags, 679 int top, int width, int height, int flags,
690 HWND parent_window) { 680 HWND parent_window) {
681
691 IPC::Reposition_Params params = {0}; 682 IPC::Reposition_Params params = {0};
692 params.window = window; 683 params.window = window;
693 params.window_insert_after = window_insert_after; 684 params.window_insert_after = window_insert_after;
694 params.left = left; 685 params.left = left;
695 params.top = top; 686 params.top = top;
696 params.width = width; 687 params.width = width;
697 params.height = height; 688 params.height = height;
698 params.flags = flags; 689 params.flags = flags;
699 params.set_parent = (::IsWindow(parent_window) ? true : false); 690 params.set_parent = (::IsWindow(parent_window) ? true : false);
700 params.parent_window = parent_window; 691 params.parent_window = parent_window;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 AutoLock lock(list_lock_); 731 AutoLock lock(list_lock_);
741 observers_list_.RemoveObserver(observer); 732 observers_list_.RemoveObserver(observer);
742 } 733 }
743 734
744 // Called on Channel background thread, if TabMessages filter is installed. 735 // Called on Channel background thread, if TabMessages filter is installed.
745 void TabProxy::OnMessageReceived(const IPC::Message& message) { 736 void TabProxy::OnMessageReceived(const IPC::Message& message) {
746 AutoLock lock(list_lock_); 737 AutoLock lock(list_lock_);
747 FOR_EACH_OBSERVER(TabProxyDelegate, observers_list_, 738 FOR_EACH_OBSERVER(TabProxyDelegate, observers_list_,
748 OnMessageReceived(this, message)); 739 OnMessageReceived(this, message));
749 } 740 }
OLDNEW
« no previous file with comments | « chrome/test/automation/tab_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698