Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(313)

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 10823086: Make plugins work in a RenderViewTest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated according to jam@ Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 if (RenderProcessImpl::InProcessPlugins()) 207 if (RenderProcessImpl::InProcessPlugins())
208 initialize_com_.reset(new base::win::ScopedCOMInitializer()); 208 initialize_com_.reset(new base::win::ScopedCOMInitializer());
209 #endif 209 #endif
210 210
211 // Register this object as the main thread. 211 // Register this object as the main thread.
212 ChildProcess::current()->set_main_thread(this); 212 ChildProcess::current()->set_main_thread(this);
213 213
214 // In single process the single process is all there is. 214 // In single process the single process is all there is.
215 suspend_webkit_shared_timer_ = true; 215 suspend_webkit_shared_timer_ = true;
216 notify_webkit_of_modal_loop_ = true; 216 notify_webkit_of_modal_loop_ = true;
217 plugin_refresh_allowed_ = true;
218 widget_count_ = 0; 217 widget_count_ = 0;
219 hidden_widget_count_ = 0; 218 hidden_widget_count_ = 0;
220 idle_notification_delay_in_ms_ = kInitialIdleHandlerDelayMs; 219 idle_notification_delay_in_ms_ = kInitialIdleHandlerDelayMs;
221 idle_notifications_to_skip_ = 0; 220 idle_notifications_to_skip_ = 0;
222 compositor_initialized_ = false; 221 compositor_initialized_ = false;
223 222
224 appcache_dispatcher_.reset(new AppCacheDispatcher(Get())); 223 appcache_dispatcher_.reset(new AppCacheDispatcher(Get()));
225 dom_storage_dispatcher_.reset(new DomStorageDispatcher()); 224 dom_storage_dispatcher_.reset(new DomStorageDispatcher());
226 main_thread_indexed_db_dispatcher_.reset(new IndexedDBDispatcher()); 225 main_thread_indexed_db_dispatcher_.reset(new IndexedDBDispatcher());
227 226
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 1028
1030 return gpu_channel_.get(); 1029 return gpu_channel_.get();
1031 } 1030 }
1032 1031
1033 void RenderThreadImpl::OnPurgePluginListCache(bool reload_pages) { 1032 void RenderThreadImpl::OnPurgePluginListCache(bool reload_pages) {
1034 EnsureWebKitInitialized(); 1033 EnsureWebKitInitialized();
1035 // The call below will cause a GetPlugins call with refresh=true, but at this 1034 // The call below will cause a GetPlugins call with refresh=true, but at this
1036 // point we already know that the browser has refreshed its list, so disable 1035 // point we already know that the browser has refreshed its list, so disable
1037 // refresh temporarily to prevent each renderer process causing the list to be 1036 // refresh temporarily to prevent each renderer process causing the list to be
1038 // regenerated. 1037 // regenerated.
1039 plugin_refresh_allowed_ = false; 1038 webkit_platform_support_->set_plugin_refresh_allowed(false);
1040 WebKit::resetPluginCache(reload_pages); 1039 WebKit::resetPluginCache(reload_pages);
1041 plugin_refresh_allowed_ = true; 1040 webkit_platform_support_->set_plugin_refresh_allowed(true);
1042 1041
1043 FOR_EACH_OBSERVER(RenderProcessObserver, observers_, PluginListChanged()); 1042 FOR_EACH_OBSERVER(RenderProcessObserver, observers_, PluginListChanged());
1044 } 1043 }
1045 1044
1046 void RenderThreadImpl::OnNetworkStateChanged(bool online) { 1045 void RenderThreadImpl::OnNetworkStateChanged(bool online) {
1047 EnsureWebKitInitialized(); 1046 EnsureWebKitInitialized();
1048 WebNetworkStateNotifier::setOnLine(online); 1047 WebNetworkStateNotifier::setOnLine(online);
1049 } 1048 }
1050 1049
1051 void RenderThreadImpl::OnTempCrashWithData(const GURL& data) { 1050 void RenderThreadImpl::OnTempCrashWithData(const GURL& data) {
1052 content::GetContentClient()->SetActiveURL(data); 1051 content::GetContentClient()->SetActiveURL(data);
1053 CHECK(false); 1052 CHECK(false);
1054 } 1053 }
1055 1054
1056 scoped_refptr<base::MessageLoopProxy> 1055 scoped_refptr<base::MessageLoopProxy>
1057 RenderThreadImpl::GetFileThreadMessageLoopProxy() { 1056 RenderThreadImpl::GetFileThreadMessageLoopProxy() {
1058 DCHECK(message_loop() == MessageLoop::current()); 1057 DCHECK(message_loop() == MessageLoop::current());
1059 if (!file_thread_.get()) { 1058 if (!file_thread_.get()) {
1060 file_thread_.reset(new base::Thread("Renderer::FILE")); 1059 file_thread_.reset(new base::Thread("Renderer::FILE"));
1061 file_thread_->Start(); 1060 file_thread_->Start();
1062 } 1061 }
1063 return file_thread_->message_loop_proxy(); 1062 return file_thread_->message_loop_proxy();
1064 } 1063 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698