| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 #include "content/renderer/service_worker/embedded_worker_dispatcher.h" | 87 #include "content/renderer/service_worker/embedded_worker_dispatcher.h" |
| 88 #include "grit/content_resources.h" | 88 #include "grit/content_resources.h" |
| 89 #include "ipc/ipc_channel_handle.h" | 89 #include "ipc/ipc_channel_handle.h" |
| 90 #include "ipc/ipc_forwarding_message_filter.h" | 90 #include "ipc/ipc_forwarding_message_filter.h" |
| 91 #include "ipc/ipc_platform_file.h" | 91 #include "ipc/ipc_platform_file.h" |
| 92 #include "media/base/audio_hardware_config.h" | 92 #include "media/base/audio_hardware_config.h" |
| 93 #include "media/base/media.h" | 93 #include "media/base/media.h" |
| 94 #include "media/filters/gpu_video_accelerator_factories.h" | 94 #include "media/filters/gpu_video_accelerator_factories.h" |
| 95 #include "net/base/net_errors.h" | 95 #include "net/base/net_errors.h" |
| 96 #include "net/base/net_util.h" | 96 #include "net/base/net_util.h" |
| 97 #include "skia/ext/event_tracer_impl.h" |
| 97 #include "third_party/WebKit/public/platform/WebString.h" | 98 #include "third_party/WebKit/public/platform/WebString.h" |
| 98 #include "third_party/WebKit/public/web/WebColorName.h" | 99 #include "third_party/WebKit/public/web/WebColorName.h" |
| 99 #include "third_party/WebKit/public/web/WebDatabase.h" | 100 #include "third_party/WebKit/public/web/WebDatabase.h" |
| 100 #include "third_party/WebKit/public/web/WebDocument.h" | 101 #include "third_party/WebKit/public/web/WebDocument.h" |
| 101 #include "third_party/WebKit/public/web/WebFrame.h" | 102 #include "third_party/WebKit/public/web/WebFrame.h" |
| 102 #include "third_party/WebKit/public/web/WebImageCache.h" | 103 #include "third_party/WebKit/public/web/WebImageCache.h" |
| 103 #include "third_party/WebKit/public/web/WebKit.h" | 104 #include "third_party/WebKit/public/web/WebKit.h" |
| 104 #include "third_party/WebKit/public/web/WebNetworkStateNotifier.h" | 105 #include "third_party/WebKit/public/web/WebNetworkStateNotifier.h" |
| 105 #include "third_party/WebKit/public/web/WebPopupMenu.h" | 106 #include "third_party/WebKit/public/web/WebPopupMenu.h" |
| 106 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" | 107 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 | 374 |
| 374 midi_message_filter_ = new MidiMessageFilter(GetIOMessageLoopProxy()); | 375 midi_message_filter_ = new MidiMessageFilter(GetIOMessageLoopProxy()); |
| 375 AddFilter(midi_message_filter_.get()); | 376 AddFilter(midi_message_filter_.get()); |
| 376 | 377 |
| 377 AddFilter((new IndexedDBMessageFilter(thread_safe_sender()))->GetFilter()); | 378 AddFilter((new IndexedDBMessageFilter(thread_safe_sender()))->GetFilter()); |
| 378 | 379 |
| 379 AddFilter((new EmbeddedWorkerContextMessageFilter())->GetFilter()); | 380 AddFilter((new EmbeddedWorkerContextMessageFilter())->GetFilter()); |
| 380 | 381 |
| 381 GetContentClient()->renderer()->RenderThreadStarted(); | 382 GetContentClient()->renderer()->RenderThreadStarted(); |
| 382 | 383 |
| 384 InitSkiaEventTracer(); |
| 385 |
| 383 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 386 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 384 if (command_line.HasSwitch(switches::kEnableGpuBenchmarking)) | 387 if (command_line.HasSwitch(switches::kEnableGpuBenchmarking)) |
| 385 RegisterExtension(GpuBenchmarkingExtension::Get()); | 388 RegisterExtension(GpuBenchmarkingExtension::Get()); |
| 386 | 389 |
| 387 // Note that under Linux, the media library will normally already have | 390 // Note that under Linux, the media library will normally already have |
| 388 // been initialized by the Zygote before this instance became a Renderer. | 391 // been initialized by the Zygote before this instance became a Renderer. |
| 389 base::FilePath media_path; | 392 base::FilePath media_path; |
| 390 PathService::Get(DIR_MEDIA_LIBS, &media_path); | 393 PathService::Get(DIR_MEDIA_LIBS, &media_path); |
| 391 if (!media_path.empty()) | 394 if (!media_path.empty()) |
| 392 media::InitializeMediaLibrary(media_path); | 395 media::InitializeMediaLibrary(media_path); |
| (...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1408 hidden_widget_count_--; | 1411 hidden_widget_count_--; |
| 1409 | 1412 |
| 1410 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1413 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
| 1411 return; | 1414 return; |
| 1412 } | 1415 } |
| 1413 | 1416 |
| 1414 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1417 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
| 1415 } | 1418 } |
| 1416 | 1419 |
| 1417 } // namespace content | 1420 } // namespace content |
| OLD | NEW |