OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/renderer/render_thread.h" | 5 #include "chrome/renderer/render_thread.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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 did_notify_webkit_of_modal_loop_ = false; | 220 did_notify_webkit_of_modal_loop_ = false; |
221 plugin_refresh_allowed_ = true; | 221 plugin_refresh_allowed_ = true; |
222 cache_stats_task_pending_ = false; | 222 cache_stats_task_pending_ = false; |
223 widget_count_ = 0; | 223 widget_count_ = 0; |
224 hidden_widget_count_ = 0; | 224 hidden_widget_count_ = 0; |
225 idle_notification_delay_in_s_ = is_extension_process_ ? | 225 idle_notification_delay_in_s_ = is_extension_process_ ? |
226 kInitialExtensionIdleHandlerDelayS : kInitialIdleHandlerDelayS; | 226 kInitialExtensionIdleHandlerDelayS : kInitialIdleHandlerDelayS; |
227 task_factory_.reset(new ScopedRunnableMethodFactory<RenderThread>(this)); | 227 task_factory_.reset(new ScopedRunnableMethodFactory<RenderThread>(this)); |
228 | 228 |
229 visited_link_slave_.reset(new VisitedLinkSlave()); | 229 visited_link_slave_.reset(new VisitedLinkSlave()); |
230 user_script_slave_.reset(new UserScriptSlave()); | 230 user_script_slave_.reset(new UserScriptSlave(this)); |
231 dns_master_.reset(new RenderDnsMaster()); | 231 dns_master_.reset(new RenderDnsMaster()); |
232 histogram_snapshots_.reset(new RendererHistogramSnapshots()); | 232 histogram_snapshots_.reset(new RendererHistogramSnapshots()); |
233 appcache_dispatcher_.reset(new AppCacheDispatcher(this)); | 233 appcache_dispatcher_.reset(new AppCacheDispatcher(this)); |
234 spellchecker_.reset(new SpellCheck()); | 234 spellchecker_.reset(new SpellCheck()); |
235 | 235 |
236 devtools_agent_filter_ = new DevToolsAgentFilter(); | 236 devtools_agent_filter_ = new DevToolsAgentFilter(); |
237 AddFilter(devtools_agent_filter_.get()); | 237 AddFilter(devtools_agent_filter_.get()); |
238 | 238 |
239 db_message_filter_ = new DBMessageFilter(); | 239 db_message_filter_ = new DBMessageFilter(); |
240 AddFilter(db_message_filter_.get()); | 240 AddFilter(db_message_filter_.get()); |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 } | 456 } |
457 | 457 |
458 void RenderThread::OnSetZoomLevelForCurrentHost(const std::string& host, | 458 void RenderThread::OnSetZoomLevelForCurrentHost(const std::string& host, |
459 int zoom_level) { | 459 int zoom_level) { |
460 RenderViewZoomer zoomer(host, zoom_level); | 460 RenderViewZoomer zoomer(host, zoom_level); |
461 RenderView::ForEach(&zoomer); | 461 RenderView::ForEach(&zoomer); |
462 } | 462 } |
463 | 463 |
464 void RenderThread::OnUpdateUserScripts(base::SharedMemoryHandle scripts) { | 464 void RenderThread::OnUpdateUserScripts(base::SharedMemoryHandle scripts) { |
465 DCHECK(base::SharedMemory::IsHandleValid(scripts)) << "Bad scripts handle"; | 465 DCHECK(base::SharedMemory::IsHandleValid(scripts)) << "Bad scripts handle"; |
466 user_script_slave_->UpdateScripts(scripts); | 466 user_script_slave_->UpdateScripts(scripts, is_incognito_process()); |
467 UpdateActiveExtensions(); | 467 UpdateActiveExtensions(); |
468 } | 468 } |
469 | 469 |
470 void RenderThread::OnSetExtensionFunctionNames( | 470 void RenderThread::OnSetExtensionFunctionNames( |
471 const std::vector<std::string>& names) { | 471 const std::vector<std::string>& names) { |
472 ExtensionProcessBindings::SetFunctionNames(names); | 472 ExtensionProcessBindings::SetFunctionNames(names); |
473 } | 473 } |
474 | 474 |
475 void RenderThread::OnPageActionsUpdated( | 475 void RenderThread::OnPageActionsUpdated( |
476 const std::string& extension_id, | 476 const std::string& extension_id, |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1001 #endif | 1001 #endif |
1002 | 1002 |
1003 if (channel_handle.name.size() != 0) { | 1003 if (channel_handle.name.size() != 0) { |
1004 // Connect to the GPU process if a channel name was received. | 1004 // Connect to the GPU process if a channel name was received. |
1005 gpu_channel_->Connect(channel_handle.name); | 1005 gpu_channel_->Connect(channel_handle.name); |
1006 } else { | 1006 } else { |
1007 // Otherwise cancel the connection. | 1007 // Otherwise cancel the connection. |
1008 gpu_channel_ = NULL; | 1008 gpu_channel_ = NULL; |
1009 } | 1009 } |
1010 } | 1010 } |
OLD | NEW |