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

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 63843002: Add ChildMessageFilter, a base class for renderer/worker cross-thread MessageFilter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/renderer/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 audio_input_message_filter_ = 364 audio_input_message_filter_ =
365 new AudioInputMessageFilter(GetIOMessageLoopProxy()); 365 new AudioInputMessageFilter(GetIOMessageLoopProxy());
366 AddFilter(audio_input_message_filter_.get()); 366 AddFilter(audio_input_message_filter_.get());
367 367
368 audio_message_filter_ = new AudioMessageFilter(GetIOMessageLoopProxy()); 368 audio_message_filter_ = new AudioMessageFilter(GetIOMessageLoopProxy());
369 AddFilter(audio_message_filter_.get()); 369 AddFilter(audio_message_filter_.get());
370 370
371 midi_message_filter_ = new MIDIMessageFilter(GetIOMessageLoopProxy()); 371 midi_message_filter_ = new MIDIMessageFilter(GetIOMessageLoopProxy());
372 AddFilter(midi_message_filter_.get()); 372 AddFilter(midi_message_filter_.get());
373 373
374 AddFilter(new IndexedDBMessageFilter(thread_safe_sender())); 374 AddFilter((new IndexedDBMessageFilter(thread_safe_sender()))->GetFilter());
375 375
376 GetContentClient()->renderer()->RenderThreadStarted(); 376 GetContentClient()->renderer()->RenderThreadStarted();
377 377
378 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 378 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
379 if (command_line.HasSwitch(switches::kEnableGpuBenchmarking)) 379 if (command_line.HasSwitch(switches::kEnableGpuBenchmarking))
380 RegisterExtension(GpuBenchmarkingExtension::Get()); 380 RegisterExtension(GpuBenchmarkingExtension::Get());
381 381
382 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) 382 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID))
383 if (command_line.HasSwitch(switches::kEnableMemoryBenchmarking)) 383 if (command_line.HasSwitch(switches::kEnableMemoryBenchmarking))
384 RegisterExtension(MemoryBenchmarkingExtension::Get()); 384 RegisterExtension(MemoryBenchmarkingExtension::Get());
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after
1347 if (!gamepad_shared_memory_reader_) 1347 if (!gamepad_shared_memory_reader_)
1348 gamepad_shared_memory_reader_.reset(new GamepadSharedMemoryReader); 1348 gamepad_shared_memory_reader_.reset(new GamepadSharedMemoryReader);
1349 gamepad_shared_memory_reader_->SampleGamepads(*data); 1349 gamepad_shared_memory_reader_->SampleGamepads(*data);
1350 } 1350 }
1351 1351
1352 base::ProcessId RenderThreadImpl::renderer_process_id() const { 1352 base::ProcessId RenderThreadImpl::renderer_process_id() const {
1353 return renderer_process_id_; 1353 return renderer_process_id_;
1354 } 1354 }
1355 1355
1356 } // namespace content 1356 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698