OLD | NEW |
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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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()))->GetFilter()); | 377 AddFilter((new IndexedDBMessageFilter(thread_safe_sender()))->GetFilter()); |
378 | 378 |
379 AddFilter((new EmbeddedWorkerContextMessageFilter())->GetFilter()); | 379 AddFilter((new EmbeddedWorkerContextMessageFilter())->GetFilter()); |
380 | 380 |
381 GetContentClient()->renderer()->RenderThreadStarted(); | 381 GetContentClient()->renderer()->RenderThreadStarted(); |
382 | 382 |
383 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 383 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
384 if (command_line.HasSwitch(switches::kEnableGpuBenchmarking)) | 384 if (command_line.HasSwitch(cc::switches::kEnableGpuBenchmarking)) |
385 RegisterExtension(GpuBenchmarkingExtension::Get()); | 385 RegisterExtension(GpuBenchmarkingExtension::Get()); |
386 | 386 |
387 // Note that under Linux, the media library will normally already have | 387 // Note that under Linux, the media library will normally already have |
388 // been initialized by the Zygote before this instance became a Renderer. | 388 // been initialized by the Zygote before this instance became a Renderer. |
389 base::FilePath media_path; | 389 base::FilePath media_path; |
390 PathService::Get(DIR_MEDIA_LIBS, &media_path); | 390 PathService::Get(DIR_MEDIA_LIBS, &media_path); |
391 if (!media_path.empty()) | 391 if (!media_path.empty()) |
392 media::InitializeMediaLibrary(media_path); | 392 media::InitializeMediaLibrary(media_path); |
393 | 393 |
394 memory_pressure_listener_.reset(new base::MemoryPressureListener( | 394 memory_pressure_listener_.reset(new base::MemoryPressureListener( |
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1408 hidden_widget_count_--; | 1408 hidden_widget_count_--; |
1409 | 1409 |
1410 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1410 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
1411 return; | 1411 return; |
1412 } | 1412 } |
1413 | 1413 |
1414 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1414 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
1415 } | 1415 } |
1416 | 1416 |
1417 } // namespace content | 1417 } // namespace content |
OLD | NEW |