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

Side by Side Diff: chrome/browser/automation/automation_provider.cc

Issue 7523060: Let pyauto create an attached webdriver instance to manipulate web pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move bools into struct Created 9 years, 4 months 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser/automation/automation_provider.h" 5 #include "chrome/browser/automation/automation_provider.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 if (effective_channel_id.length() <= 0) 149 if (effective_channel_id.length() <= 0)
150 return false; 150 return false;
151 151
152 reinitialize_on_channel_error_ = true; 152 reinitialize_on_channel_error_ = true;
153 } 153 }
154 154
155 if (!automation_resource_message_filter_.get()) { 155 if (!automation_resource_message_filter_.get()) {
156 automation_resource_message_filter_ = new AutomationResourceMessageFilter; 156 automation_resource_message_filter_ = new AutomationResourceMessageFilter;
157 } 157 }
158 158
159 base::ThreadRestrictions::ScopedAllowIO allow_io;
159 channel_.reset(new IPC::ChannelProxy( 160 channel_.reset(new IPC::ChannelProxy(
160 effective_channel_id, 161 effective_channel_id,
161 GetChannelMode(use_named_interface), 162 GetChannelMode(use_named_interface),
162 this, 163 this,
163 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))); 164 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)));
164 channel_->AddFilter(automation_resource_message_filter_); 165 channel_->AddFilter(automation_resource_message_filter_);
165 166
166 #if defined(OS_CHROMEOS) 167 #if defined(OS_CHROMEOS)
167 // Wait for the network manager to initialize. 168 // Wait for the network manager to initialize.
168 // The observer will delete itself when done. 169 // The observer will delete itself when done.
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 } 961 }
961 } 962 }
962 } 963 }
963 964
964 void AutomationProvider::SaveAsAsync(int tab_handle) { 965 void AutomationProvider::SaveAsAsync(int tab_handle) {
965 NavigationController* tab = NULL; 966 NavigationController* tab = NULL;
966 TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab); 967 TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab);
967 if (tab_contents) 968 if (tab_contents)
968 tab_contents->OnSavePage(); 969 tab_contents->OnSavePage();
969 } 970 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698