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

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

Issue 5513001: Add a base class for objects that want to filter messages on the UI thread. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Fix possible race condition Created 10 years 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/automation_proxy.h" 5 #include "chrome/test/automation/automation_proxy.h"
6 6
7 #include <gtest/gtest.h> 7 #include <gtest/gtest.h>
8 8
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 150
151 // TODO(iyengar) 151 // TODO(iyengar)
152 // The shutdown event could be global on the same lines as the automation 152 // The shutdown event could be global on the same lines as the automation
153 // provider, where we use the shutdown event provided by the chrome browser 153 // provider, where we use the shutdown event provided by the chrome browser
154 // process. 154 // process.
155 channel_.reset(new IPC::SyncChannel( 155 channel_.reset(new IPC::SyncChannel(
156 channel_id, 156 channel_id,
157 use_named_interface ? IPC::Channel::MODE_NAMED_CLIENT 157 use_named_interface ? IPC::Channel::MODE_NAMED_CLIENT
158 : IPC::Channel::MODE_SERVER, 158 : IPC::Channel::MODE_SERVER,
159 this, // we are the listener 159 this, // we are the listener
160 new AutomationMessageFilter(this),
161 thread_->message_loop(), 160 thread_->message_loop(),
162 true, 161 true,
163 shutdown_event_.get())); 162 shutdown_event_.get()));
163 channel_->AddFilter(new AutomationMessageFilter(this));
164 } 164 }
165 165
166 void AutomationProxy::InitializeHandleTracker() { 166 void AutomationProxy::InitializeHandleTracker() {
167 tracker_.reset(new AutomationHandleTracker()); 167 tracker_.reset(new AutomationHandleTracker());
168 } 168 }
169 169
170 AutomationLaunchResult AutomationProxy::WaitForAppLaunch() { 170 AutomationLaunchResult AutomationProxy::WaitForAppLaunch() {
171 AutomationLaunchResult result = AUTOMATION_SUCCESS; 171 AutomationLaunchResult result = AUTOMATION_SUCCESS;
172 if (app_launched_.TimedWait(command_execution_timeout_)) { 172 if (app_launched_.TimedWait(command_execution_timeout_)) {
173 if (perform_version_check_) { 173 if (perform_version_check_) {
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 password, 543 password,
544 &success)); 544 &success));
545 // If message sending unsuccessful or test failed, return false. 545 // If message sending unsuccessful or test failed, return false.
546 return sent && success; 546 return sent && success;
547 } 547 }
548 #endif 548 #endif
549 549
550 bool AutomationProxy::ResetToDefaultTheme() { 550 bool AutomationProxy::ResetToDefaultTheme() {
551 return Send(new AutomationMsg_ResetToDefaultTheme(0)); 551 return Send(new AutomationMsg_ResetToDefaultTheme(0));
552 } 552 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698