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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
46 #include "content/public/renderer/content_renderer_client.h" | 46 #include "content/public/renderer/content_renderer_client.h" |
47 #include "content/public/renderer/render_process_observer.h" | 47 #include "content/public/renderer/render_process_observer.h" |
48 #include "content/public/renderer/render_view_visitor.h" | 48 #include "content/public/renderer/render_view_visitor.h" |
49 #include "content/renderer/browser_plugin/browser_plugin_channel_manager.h" | 49 #include "content/renderer/browser_plugin/browser_plugin_channel_manager.h" |
50 #include "content/renderer/browser_plugin/browser_plugin_registry.h" | 50 #include "content/renderer/browser_plugin/browser_plugin_registry.h" |
51 #include "content/renderer/devtools_agent_filter.h" | 51 #include "content/renderer/devtools_agent_filter.h" |
52 #include "content/renderer/dom_storage/dom_storage_dispatcher.h" | 52 #include "content/renderer/dom_storage/dom_storage_dispatcher.h" |
53 #include "content/renderer/dom_storage/webstoragearea_impl.h" | 53 #include "content/renderer/dom_storage/webstoragearea_impl.h" |
54 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" | 54 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" |
55 #include "content/renderer/gpu/compositor_thread.h" | 55 #include "content/renderer/gpu/compositor_thread.h" |
56 #include "content/renderer/gpu_benchmarking_extension.h" | |
jam
2012/06/08 00:52:04
should this code be under content/renderer/gpu/?
dmurph
2012/06/08 18:36:22
following the alphabetical order of 'renderer' (wh
jam
2012/06/08 18:39:13
I meant should the file itself be located in conte
dmurph
2012/06/08 19:30:13
Ah. Yes, it should. Moved.
| |
56 #include "content/renderer/media/audio_input_message_filter.h" | 57 #include "content/renderer/media/audio_input_message_filter.h" |
57 #include "content/renderer/media/audio_message_filter.h" | 58 #include "content/renderer/media/audio_message_filter.h" |
58 #include "content/renderer/media/media_stream_center.h" | 59 #include "content/renderer/media/media_stream_center.h" |
59 #include "content/renderer/media/video_capture_impl_manager.h" | 60 #include "content/renderer/media/video_capture_impl_manager.h" |
60 #include "content/renderer/media/video_capture_message_filter.h" | 61 #include "content/renderer/media/video_capture_message_filter.h" |
61 #include "content/renderer/plugin_channel_host.h" | 62 #include "content/renderer/plugin_channel_host.h" |
62 #include "content/renderer/render_process_impl.h" | 63 #include "content/renderer/render_process_impl.h" |
63 #include "content/renderer/render_view_impl.h" | 64 #include "content/renderer/render_view_impl.h" |
64 #include "content/renderer/renderer_webkitplatformsupport_impl.h" | 65 #include "content/renderer/renderer_webkitplatformsupport_impl.h" |
65 #include "grit/content_resources.h" | 66 #include "grit/content_resources.h" |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
234 audio_message_filter_ = new AudioMessageFilter(); | 235 audio_message_filter_ = new AudioMessageFilter(); |
235 AddFilter(audio_message_filter_.get()); | 236 AddFilter(audio_message_filter_.get()); |
236 | 237 |
237 devtools_agent_message_filter_ = new DevToolsAgentFilter(); | 238 devtools_agent_message_filter_ = new DevToolsAgentFilter(); |
238 AddFilter(devtools_agent_message_filter_.get()); | 239 AddFilter(devtools_agent_message_filter_.get()); |
239 | 240 |
240 AddFilter(new IndexedDBMessageFilter); | 241 AddFilter(new IndexedDBMessageFilter); |
241 | 242 |
242 content::GetContentClient()->renderer()->RenderThreadStarted(); | 243 content::GetContentClient()->renderer()->RenderThreadStarted(); |
243 | 244 |
245 CommandLine* command_line = CommandLine::ForCurrentProcess(); | |
246 if (command_line->HasSwitch(switches::kEnableGpuBenchmarking)) | |
247 RegisterExtension(content::GpuBenchmarkingExtension::Get()); | |
jam
2012/06/08 00:52:04
nit: 2 spaces
dmurph
2012/06/08 18:36:22
Done.
| |
248 | |
244 // Note that under Linux, the media library will normally already have | 249 // Note that under Linux, the media library will normally already have |
245 // been initialized by the Zygote before this instance became a Renderer. | 250 // been initialized by the Zygote before this instance became a Renderer. |
246 FilePath media_path; | 251 FilePath media_path; |
247 PathService::Get(content::DIR_MEDIA_LIBS, &media_path); | 252 PathService::Get(content::DIR_MEDIA_LIBS, &media_path); |
248 if (!media_path.empty()) | 253 if (!media_path.empty()) |
249 media::InitializeMediaLibrary(media_path); | 254 media::InitializeMediaLibrary(media_path); |
250 | 255 |
251 TRACE_EVENT_END_ETW("RenderThreadImpl::Init", 0, ""); | 256 TRACE_EVENT_END_ETW("RenderThreadImpl::Init", 0, ""); |
252 } | 257 } |
253 | 258 |
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
986 | 991 |
987 scoped_refptr<base::MessageLoopProxy> | 992 scoped_refptr<base::MessageLoopProxy> |
988 RenderThreadImpl::GetFileThreadMessageLoopProxy() { | 993 RenderThreadImpl::GetFileThreadMessageLoopProxy() { |
989 DCHECK(message_loop() == MessageLoop::current()); | 994 DCHECK(message_loop() == MessageLoop::current()); |
990 if (!file_thread_.get()) { | 995 if (!file_thread_.get()) { |
991 file_thread_.reset(new base::Thread("Renderer::FILE")); | 996 file_thread_.reset(new base::Thread("Renderer::FILE")); |
992 file_thread_->Start(); | 997 file_thread_->Start(); |
993 } | 998 } |
994 return file_thread_->message_loop_proxy(); | 999 return file_thread_->message_loop_proxy(); |
995 } | 1000 } |
OLD | NEW |