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

Side by Side Diff: chrome/browser/automation/automation_provider.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
« no previous file with comments | « no previous file | chrome/browser/browser_io_message_filter.h » ('j') | ipc/ipc_channel_proxy.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browser_io_message_filter.h » ('j') | ipc/ipc_channel_proxy.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698