OLD | NEW |
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/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 } | 156 } |
157 | 157 |
158 if (!automation_resource_message_filter_.get()) { | 158 if (!automation_resource_message_filter_.get()) { |
159 automation_resource_message_filter_ = new AutomationResourceMessageFilter; | 159 automation_resource_message_filter_ = new AutomationResourceMessageFilter; |
160 } | 160 } |
161 | 161 |
162 channel_.reset(new IPC::ChannelProxy( | 162 channel_.reset(new IPC::ChannelProxy( |
163 effective_channel_id, | 163 effective_channel_id, |
164 GetChannelMode(use_named_interface), | 164 GetChannelMode(use_named_interface), |
165 this, | 165 this, |
166 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), | 166 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))); |
167 false /* needs_override_peer_pid */)); | |
168 channel_->AddFilter(automation_resource_message_filter_); | 167 channel_->AddFilter(automation_resource_message_filter_); |
169 | 168 |
170 #if defined(OS_CHROMEOS) | 169 #if defined(OS_CHROMEOS) |
171 // Wait for the network manager to initialize. | 170 // Wait for the network manager to initialize. |
172 // The observer will delete itself when done. | 171 // The observer will delete itself when done. |
173 network_library_initialized_ = false; | 172 network_library_initialized_ = false; |
174 NetworkManagerInitObserver* observer = new NetworkManagerInitObserver(this); | 173 NetworkManagerInitObserver* observer = new NetworkManagerInitObserver(this); |
175 if (!observer->Init()) | 174 if (!observer->Init()) |
176 delete observer; | 175 delete observer; |
177 #endif | 176 #endif |
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
945 } | 944 } |
946 } | 945 } |
947 } | 946 } |
948 | 947 |
949 void AutomationProvider::SaveAsAsync(int tab_handle) { | 948 void AutomationProvider::SaveAsAsync(int tab_handle) { |
950 NavigationController* tab = NULL; | 949 NavigationController* tab = NULL; |
951 TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab); | 950 TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab); |
952 if (tab_contents) | 951 if (tab_contents) |
953 tab_contents->OnSavePage(); | 952 tab_contents->OnSavePage(); |
954 } | 953 } |
OLD | NEW |