| 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> |
| 11 | 11 |
| 12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
| 13 #include "base/debug/trace_event.h" | 13 #include "base/debug/trace_event.h" |
| 14 #include "base/lazy_instance.h" | 14 #include "base/lazy_instance.h" |
| 15 #include "base/logging.h" | 15 #include "base/logging.h" |
| 16 #include "base/metrics/field_trial.h" | 16 #include "base/metrics/field_trial.h" |
| 17 #include "base/metrics/stats_table.h" | 17 #include "base/metrics/stats_table.h" |
| 18 #include "base/nullable_string16.h" | 18 #include "base/nullable_string16.h" |
| 19 #include "base/process_util.h" | 19 #include "base/process_util.h" |
| 20 #include "base/scoped_callback_factory.h" | 20 #include "base/scoped_callback_factory.h" |
| 21 #include "base/shared_memory.h" | 21 #include "base/shared_memory.h" |
| 22 #include "base/string_util.h" | 22 #include "base/string_util.h" |
| 23 #include "base/task.h" | 23 #include "base/task.h" |
| 24 #include "base/thread_local.h" | 24 #include "base/thread_local.h" |
| 25 #include "base/utf_string_conversions.h" | 25 #include "base/utf_string_conversions.h" |
| 26 #include "base/values.h" | 26 #include "base/values.h" |
| 27 #include "chrome/common/appcache/appcache_dispatcher.h" | 27 #include "chrome/common/appcache/appcache_dispatcher.h" |
| 28 #include "chrome/common/child_process_logging.h" | 28 #include "chrome/common/child_process_logging.h" |
| 29 #include "chrome/common/chrome_switches.h" | 29 #include "chrome/common/chrome_switches.h" |
| 30 #include "chrome/common/database_messages.h" |
| 30 #include "chrome/common/db_message_filter.h" | 31 #include "chrome/common/db_message_filter.h" |
| 31 #include "chrome/common/dom_storage_common.h" | 32 #include "chrome/common/dom_storage_common.h" |
| 32 #include "chrome/common/plugin_messages.h" | 33 #include "chrome/common/plugin_messages.h" |
| 33 #include "chrome/common/render_messages.h" | 34 #include "chrome/common/render_messages.h" |
| 34 #include "chrome/common/render_messages_params.h" | 35 #include "chrome/common/render_messages_params.h" |
| 35 #include "chrome/common/renderer_preferences.h" | 36 #include "chrome/common/renderer_preferences.h" |
| 36 #include "chrome/common/url_constants.h" | 37 #include "chrome/common/url_constants.h" |
| 37 #include "chrome/common/web_database_observer_impl.h" | 38 #include "chrome/common/web_database_observer_impl.h" |
| 38 #include "chrome/plugin/npobject_util.h" | 39 #include "chrome/plugin/npobject_util.h" |
| 39 // TODO(port) | 40 // TODO(port) |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 if (msg->is_sync()) { | 386 if (msg->is_sync()) { |
| 386 if (msg->is_caller_pumping_messages()) { | 387 if (msg->is_caller_pumping_messages()) { |
| 387 pumping_events = true; | 388 pumping_events = true; |
| 388 } else { | 389 } else { |
| 389 switch (msg->type()) { | 390 switch (msg->type()) { |
| 390 case ViewHostMsg_GetCookies::ID: | 391 case ViewHostMsg_GetCookies::ID: |
| 391 case ViewHostMsg_GetRawCookies::ID: | 392 case ViewHostMsg_GetRawCookies::ID: |
| 392 case ViewHostMsg_CookiesEnabled::ID: | 393 case ViewHostMsg_CookiesEnabled::ID: |
| 393 case ViewHostMsg_DOMStorageSetItem::ID: | 394 case ViewHostMsg_DOMStorageSetItem::ID: |
| 394 case ViewHostMsg_SyncLoad::ID: | 395 case ViewHostMsg_SyncLoad::ID: |
| 395 case ViewHostMsg_AllowDatabase::ID: | 396 case DatabaseHostMsg_Allow::ID: |
| 396 may_show_cookie_prompt = true; | 397 may_show_cookie_prompt = true; |
| 397 pumping_events = true; | 398 pumping_events = true; |
| 398 break; | 399 break; |
| 399 } | 400 } |
| 400 } | 401 } |
| 401 } | 402 } |
| 402 | 403 |
| 403 bool suspend_webkit_shared_timer = true; // default value | 404 bool suspend_webkit_shared_timer = true; // default value |
| 404 std::swap(suspend_webkit_shared_timer, suspend_webkit_shared_timer_); | 405 std::swap(suspend_webkit_shared_timer, suspend_webkit_shared_timer_); |
| 405 | 406 |
| (...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1138 } | 1139 } |
| 1139 | 1140 |
| 1140 return false; | 1141 return false; |
| 1141 } | 1142 } |
| 1142 | 1143 |
| 1143 void RenderThread::RegisterExtension(v8::Extension* extension, | 1144 void RenderThread::RegisterExtension(v8::Extension* extension, |
| 1144 bool restrict_to_extensions) { | 1145 bool restrict_to_extensions) { |
| 1145 WebScriptController::registerExtension(extension); | 1146 WebScriptController::registerExtension(extension); |
| 1146 v8_extensions_[extension->name()] = restrict_to_extensions; | 1147 v8_extensions_[extension->name()] = restrict_to_extensions; |
| 1147 } | 1148 } |
| OLD | NEW |