| 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> |
| 11 | 11 |
| 12 #include "base/allocator/allocator_extension.h" | 12 #include "base/allocator/allocator_extension.h" |
| 13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
| 14 #include "base/debug/trace_event.h" | 14 #include "base/debug/trace_event.h" |
| 15 #include "base/lazy_instance.h" | 15 #include "base/lazy_instance.h" |
| 16 #include "base/logging.h" | 16 #include "base/logging.h" |
| 17 #include "base/metrics/field_trial.h" | 17 #include "base/metrics/field_trial.h" |
| 18 #include "base/metrics/histogram.h" | 18 #include "base/metrics/histogram.h" |
| 19 #include "base/metrics/stats_table.h" | 19 #include "base/metrics/stats_table.h" |
| 20 #include "base/path_service.h" | 20 #include "base/path_service.h" |
| 21 #include "base/shared_memory.h" | 21 #include "base/shared_memory.h" |
| 22 #include "base/string16.h" |
| 22 #include "base/string_number_conversions.h" // Temporary | 23 #include "base/string_number_conversions.h" // Temporary |
| 23 #include "base/threading/thread_local.h" | 24 #include "base/threading/thread_local.h" |
| 24 #include "base/utf_string_conversions.h" | 25 #include "base/utf_string_conversions.h" |
| 25 #include "base/values.h" | 26 #include "base/values.h" |
| 26 #include "content/common/appcache/appcache_dispatcher.h" | 27 #include "content/common/appcache/appcache_dispatcher.h" |
| 27 #include "content/common/child_histogram_message_filter.h" | 28 #include "content/common/child_histogram_message_filter.h" |
| 28 #include "content/common/child_process_messages.h" | 29 #include "content/common/child_process_messages.h" |
| 29 #include "content/common/database_messages.h" | 30 #include "content/common/database_messages.h" |
| 30 #include "content/common/db_message_filter.h" | 31 #include "content/common/db_message_filter.h" |
| 31 #include "content/common/dom_storage_messages.h" | 32 #include "content/common/dom_storage_messages.h" |
| (...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 845 if (!audio_renderer_mixer_manager_.get()) { | 846 if (!audio_renderer_mixer_manager_.get()) { |
| 846 audio_renderer_mixer_manager_.reset(new AudioRendererMixerManager( | 847 audio_renderer_mixer_manager_.reset(new AudioRendererMixerManager( |
| 847 GetAudioOutputSampleRate(), | 848 GetAudioOutputSampleRate(), |
| 848 GetAudioOutputBufferSize())); | 849 GetAudioOutputBufferSize())); |
| 849 } | 850 } |
| 850 | 851 |
| 851 return audio_renderer_mixer_manager_.get(); | 852 return audio_renderer_mixer_manager_.get(); |
| 852 } | 853 } |
| 853 | 854 |
| 854 #if defined(OS_WIN) | 855 #if defined(OS_WIN) |
| 856 void RenderThreadImpl::PreCacheFontCharacters(const LOGFONT& log_font, |
| 857 const string16& str) { |
| 858 Send(new ViewHostMsg_PreCacheFontCharacters(log_font, str)); |
| 859 } |
| 860 |
| 855 void RenderThreadImpl::PreCacheFont(const LOGFONT& log_font) { | 861 void RenderThreadImpl::PreCacheFont(const LOGFONT& log_font) { |
| 856 Send(new ChildProcessHostMsg_PreCacheFont(log_font)); | 862 Send(new ChildProcessHostMsg_PreCacheFont(log_font)); |
| 857 } | 863 } |
| 858 | 864 |
| 859 void RenderThreadImpl::ReleaseCachedFonts() { | 865 void RenderThreadImpl::ReleaseCachedFonts() { |
| 860 Send(new ChildProcessHostMsg_ReleaseCachedFonts()); | 866 Send(new ChildProcessHostMsg_ReleaseCachedFonts()); |
| 861 } | 867 } |
| 862 | 868 |
| 863 #endif // OS_WIN | 869 #endif // OS_WIN |
| 864 | 870 |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1109 RenderThreadImpl::GetFileThreadMessageLoopProxy() { | 1115 RenderThreadImpl::GetFileThreadMessageLoopProxy() { |
| 1110 DCHECK(message_loop() == MessageLoop::current()); | 1116 DCHECK(message_loop() == MessageLoop::current()); |
| 1111 if (!file_thread_.get()) { | 1117 if (!file_thread_.get()) { |
| 1112 file_thread_.reset(new base::Thread("Renderer::FILE")); | 1118 file_thread_.reset(new base::Thread("Renderer::FILE")); |
| 1113 file_thread_->Start(); | 1119 file_thread_->Start(); |
| 1114 } | 1120 } |
| 1115 return file_thread_->message_loop_proxy(); | 1121 return file_thread_->message_loop_proxy(); |
| 1116 } | 1122 } |
| 1117 | 1123 |
| 1118 } // namespace content | 1124 } // namespace content |
| OLD | NEW |