| OLD | NEW |
| 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/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 "app/message_box_flags.h" | 9 #include "app/message_box_flags.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 | 169 |
| 170 if (!automation_resource_message_filter_.get()) { | 170 if (!automation_resource_message_filter_.get()) { |
| 171 automation_resource_message_filter_ = new AutomationResourceMessageFilter; | 171 automation_resource_message_filter_ = new AutomationResourceMessageFilter; |
| 172 } | 172 } |
| 173 | 173 |
| 174 channel_.reset(new IPC::SyncChannel( | 174 channel_.reset(new IPC::SyncChannel( |
| 175 effective_channel_id, | 175 effective_channel_id, |
| 176 use_named_interface ? IPC::Channel::MODE_NAMED_SERVER | 176 use_named_interface ? IPC::Channel::MODE_NAMED_SERVER |
| 177 : IPC::Channel::MODE_CLIENT, | 177 : IPC::Channel::MODE_CLIENT, |
| 178 this, | 178 this, |
| 179 automation_resource_message_filter_, | |
| 180 g_browser_process->io_thread()->message_loop(), | 179 g_browser_process->io_thread()->message_loop(), |
| 181 true, g_browser_process->shutdown_event())); | 180 true, g_browser_process->shutdown_event())); |
| 181 channel_->AddFilter(automation_resource_message_filter_); |
| 182 | 182 |
| 183 TRACE_EVENT_END("AutomationProvider::InitializeChannel", 0, ""); | 183 TRACE_EVENT_END("AutomationProvider::InitializeChannel", 0, ""); |
| 184 | 184 |
| 185 return true; | 185 return true; |
| 186 } | 186 } |
| 187 | 187 |
| 188 std::string AutomationProvider::GetProtocolVersion() { | 188 std::string AutomationProvider::GetProtocolVersion() { |
| 189 chrome::VersionInfo version_info; | 189 chrome::VersionInfo version_info; |
| 190 return version_info.Version().c_str(); | 190 return version_info.Version().c_str(); |
| 191 } | 191 } |
| (...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1019 } | 1019 } |
| 1020 } | 1020 } |
| 1021 } | 1021 } |
| 1022 | 1022 |
| 1023 void AutomationProvider::SaveAsAsync(int tab_handle) { | 1023 void AutomationProvider::SaveAsAsync(int tab_handle) { |
| 1024 NavigationController* tab = NULL; | 1024 NavigationController* tab = NULL; |
| 1025 TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab); | 1025 TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab); |
| 1026 if (tab_contents) | 1026 if (tab_contents) |
| 1027 tab_contents->OnSavePage(); | 1027 tab_contents->OnSavePage(); |
| 1028 } | 1028 } |
| OLD | NEW |