| 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 #endif | 179 #endif |
| 180 | 180 |
| 181 lazy_tls.Pointer()->Set(this); | 181 lazy_tls.Pointer()->Set(this); |
| 182 #if defined(OS_WIN) | 182 #if defined(OS_WIN) |
| 183 // If you are running plugins in this thread you need COM active but in | 183 // If you are running plugins in this thread you need COM active but in |
| 184 // the normal case you don't. | 184 // the normal case you don't. |
| 185 if (RenderProcessImpl::InProcessPlugins()) | 185 if (RenderProcessImpl::InProcessPlugins()) |
| 186 initialize_com_.reset(new base::win::ScopedCOMInitializer()); | 186 initialize_com_.reset(new base::win::ScopedCOMInitializer()); |
| 187 #endif | 187 #endif |
| 188 | 188 |
| 189 // Register this object as the main thread. |
| 190 ChildProcess::current()->set_main_thread(this); |
| 191 |
| 189 // In single process the single process is all there is. | 192 // In single process the single process is all there is. |
| 190 suspend_webkit_shared_timer_ = true; | 193 suspend_webkit_shared_timer_ = true; |
| 191 notify_webkit_of_modal_loop_ = true; | 194 notify_webkit_of_modal_loop_ = true; |
| 192 plugin_refresh_allowed_ = true; | 195 plugin_refresh_allowed_ = true; |
| 193 widget_count_ = 0; | 196 widget_count_ = 0; |
| 194 hidden_widget_count_ = 0; | 197 hidden_widget_count_ = 0; |
| 195 idle_notification_delay_in_ms_ = kInitialIdleHandlerDelayMs; | 198 idle_notification_delay_in_ms_ = kInitialIdleHandlerDelayMs; |
| 196 idle_notifications_to_skip_ = 0; | 199 idle_notifications_to_skip_ = 0; |
| 197 compositor_initialized_ = false; | 200 compositor_initialized_ = false; |
| 198 | 201 |
| (...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 853 | 856 |
| 854 scoped_refptr<base::MessageLoopProxy> | 857 scoped_refptr<base::MessageLoopProxy> |
| 855 RenderThreadImpl::GetFileThreadMessageLoopProxy() { | 858 RenderThreadImpl::GetFileThreadMessageLoopProxy() { |
| 856 DCHECK(message_loop() == MessageLoop::current()); | 859 DCHECK(message_loop() == MessageLoop::current()); |
| 857 if (!file_thread_.get()) { | 860 if (!file_thread_.get()) { |
| 858 file_thread_.reset(new base::Thread("Renderer::FILE")); | 861 file_thread_.reset(new base::Thread("Renderer::FILE")); |
| 859 file_thread_->Start(); | 862 file_thread_->Start(); |
| 860 } | 863 } |
| 861 return file_thread_->message_loop_proxy(); | 864 return file_thread_->message_loop_proxy(); |
| 862 } | 865 } |
| OLD | NEW |