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

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: cross thread -> child message filter 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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 audio_input_message_filter_ = 367 audio_input_message_filter_ =
368 new AudioInputMessageFilter(GetIOMessageLoopProxy()); 368 new AudioInputMessageFilter(GetIOMessageLoopProxy());
369 AddFilter(audio_input_message_filter_.get()); 369 AddFilter(audio_input_message_filter_.get());
370 370
371 audio_message_filter_ = new AudioMessageFilter(GetIOMessageLoopProxy()); 371 audio_message_filter_ = new AudioMessageFilter(GetIOMessageLoopProxy());
372 AddFilter(audio_message_filter_.get()); 372 AddFilter(audio_message_filter_.get());
373 373
374 midi_message_filter_ = new MIDIMessageFilter(GetIOMessageLoopProxy()); 374 midi_message_filter_ = new MIDIMessageFilter(GetIOMessageLoopProxy());
375 AddFilter(midi_message_filter_.get()); 375 AddFilter(midi_message_filter_.get());
376 376
377 AddFilter(new IndexedDBMessageFilter(thread_safe_sender())); 377 AddFilter((new IndexedDBMessageFilter(thread_safe_sender()))->GetFilter());
378 378
379 GetContentClient()->renderer()->RenderThreadStarted(); 379 GetContentClient()->renderer()->RenderThreadStarted();
380 380
381 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 381 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
382 if (command_line.HasSwitch(switches::kEnableGpuBenchmarking)) 382 if (command_line.HasSwitch(switches::kEnableGpuBenchmarking))
383 RegisterExtension(GpuBenchmarkingExtension::Get()); 383 RegisterExtension(GpuBenchmarkingExtension::Get());
384 384
385 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) 385 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID))
386 if (command_line.HasSwitch(switches::kEnableMemoryBenchmarking)) 386 if (command_line.HasSwitch(switches::kEnableMemoryBenchmarking))
387 RegisterExtension(MemoryBenchmarkingExtension::Get()); 387 RegisterExtension(MemoryBenchmarkingExtension::Get());
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
1367 if (!gamepad_shared_memory_reader_) 1367 if (!gamepad_shared_memory_reader_)
1368 gamepad_shared_memory_reader_.reset(new GamepadSharedMemoryReader); 1368 gamepad_shared_memory_reader_.reset(new GamepadSharedMemoryReader);
1369 gamepad_shared_memory_reader_->SampleGamepads(*data); 1369 gamepad_shared_memory_reader_->SampleGamepads(*data);
1370 } 1370 }
1371 1371
1372 base::ProcessId RenderThreadImpl::renderer_process_id() const { 1372 base::ProcessId RenderThreadImpl::renderer_process_id() const {
1373 return renderer_process_id_; 1373 return renderer_process_id_;
1374 } 1374 }
1375 1375
1376 } // namespace content 1376 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698