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 13 matching lines...) Expand all Loading... |
24 #include "base/values.h" | 24 #include "base/values.h" |
25 #include "chrome/common/appcache/appcache_dispatcher.h" | 25 #include "chrome/common/appcache/appcache_dispatcher.h" |
26 #include "chrome/common/child_process_logging.h" | 26 #include "chrome/common/child_process_logging.h" |
27 #include "chrome/common/chrome_switches.h" | 27 #include "chrome/common/chrome_switches.h" |
28 #include "chrome/common/database_messages.h" | 28 #include "chrome/common/database_messages.h" |
29 #include "chrome/common/db_message_filter.h" | 29 #include "chrome/common/db_message_filter.h" |
30 #include "chrome/common/dom_storage_messages.h" | 30 #include "chrome/common/dom_storage_messages.h" |
31 #include "chrome/common/extensions/extension.h" | 31 #include "chrome/common/extensions/extension.h" |
32 #include "chrome/common/extensions/extension_localization_peer.h" | 32 #include "chrome/common/extensions/extension_localization_peer.h" |
33 #include "chrome/common/extensions/extension_set.h" | 33 #include "chrome/common/extensions/extension_set.h" |
34 #include "chrome/common/gpu_messages.h" | |
35 #include "chrome/common/plugin_messages.h" | 34 #include "chrome/common/plugin_messages.h" |
36 #include "chrome/common/render_messages.h" | 35 #include "chrome/common/render_messages.h" |
37 #include "chrome/common/render_messages_params.h" | 36 #include "chrome/common/render_messages_params.h" |
38 #include "chrome/common/renderer_preferences.h" | 37 #include "chrome/common/renderer_preferences.h" |
39 #include "chrome/common/url_constants.h" | 38 #include "chrome/common/url_constants.h" |
40 #include "chrome/common/web_database_observer_impl.h" | 39 #include "chrome/common/web_database_observer_impl.h" |
41 #include "chrome/plugin/npobject_util.h" | 40 #include "chrome/plugin/npobject_util.h" |
42 #include "chrome/renderer/automation/dom_automation_v8_extension.h" | 41 #include "chrome/renderer/automation/dom_automation_v8_extension.h" |
43 #include "chrome/renderer/cookie_message_filter.h" | 42 #include "chrome/renderer/cookie_message_filter.h" |
44 #include "chrome/renderer/devtools_agent_filter.h" | 43 #include "chrome/renderer/devtools_agent_filter.h" |
(...skipping 15 matching lines...) Expand all Loading... |
60 #include "chrome/renderer/render_view_visitor.h" | 59 #include "chrome/renderer/render_view_visitor.h" |
61 #include "chrome/renderer/renderer_histogram_snapshots.h" | 60 #include "chrome/renderer/renderer_histogram_snapshots.h" |
62 #include "chrome/renderer/renderer_webidbfactory_impl.h" | 61 #include "chrome/renderer/renderer_webidbfactory_impl.h" |
63 #include "chrome/renderer/renderer_webkitclient_impl.h" | 62 #include "chrome/renderer/renderer_webkitclient_impl.h" |
64 #include "chrome/renderer/safe_browsing/phishing_classifier_delegate.h" | 63 #include "chrome/renderer/safe_browsing/phishing_classifier_delegate.h" |
65 #include "chrome/renderer/search_extension.h" | 64 #include "chrome/renderer/search_extension.h" |
66 #include "chrome/renderer/searchbox_extension.h" | 65 #include "chrome/renderer/searchbox_extension.h" |
67 #include "chrome/renderer/security_filter_peer.h" | 66 #include "chrome/renderer/security_filter_peer.h" |
68 #include "chrome/renderer/spellchecker/spellcheck.h" | 67 #include "chrome/renderer/spellchecker/spellcheck.h" |
69 #include "chrome/renderer/user_script_slave.h" | 68 #include "chrome/renderer/user_script_slave.h" |
| 69 #include "content/common/gpu_messages.h" |
70 #include "content/common/resource_dispatcher.h" | 70 #include "content/common/resource_dispatcher.h" |
71 #include "content/common/resource_messages.h" | 71 #include "content/common/resource_messages.h" |
72 #include "ipc/ipc_channel_handle.h" | 72 #include "ipc/ipc_channel_handle.h" |
73 #include "ipc/ipc_platform_file.h" | 73 #include "ipc/ipc_platform_file.h" |
74 #include "net/base/net_errors.h" | 74 #include "net/base/net_errors.h" |
75 #include "net/base/net_util.h" | 75 #include "net/base/net_util.h" |
76 #include "third_party/sqlite/sqlite3.h" | 76 #include "third_party/sqlite/sqlite3.h" |
77 #include "third_party/tcmalloc/chromium/src/google/malloc_extension.h" | 77 #include "third_party/tcmalloc/chromium/src/google/malloc_extension.h" |
78 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h" | 78 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h" |
79 #include "third_party/WebKit/Source/WebKit/chromium/public/WebColor.h" | 79 #include "third_party/WebKit/Source/WebKit/chromium/public/WebColor.h" |
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
672 IPC_MESSAGE_HANDLER(ViewMsg_Extension_SetHostPermissions, | 672 IPC_MESSAGE_HANDLER(ViewMsg_Extension_SetHostPermissions, |
673 OnExtensionSetHostPermissions) | 673 OnExtensionSetHostPermissions) |
674 IPC_MESSAGE_HANDLER(DOMStorageMsg_Event, | 674 IPC_MESSAGE_HANDLER(DOMStorageMsg_Event, |
675 OnDOMStorageEvent) | 675 OnDOMStorageEvent) |
676 IPC_MESSAGE_HANDLER(ViewMsg_SpellChecker_Init, | 676 IPC_MESSAGE_HANDLER(ViewMsg_SpellChecker_Init, |
677 OnInitSpellChecker) | 677 OnInitSpellChecker) |
678 IPC_MESSAGE_HANDLER(ViewMsg_SpellChecker_WordAdded, | 678 IPC_MESSAGE_HANDLER(ViewMsg_SpellChecker_WordAdded, |
679 OnSpellCheckWordAdded) | 679 OnSpellCheckWordAdded) |
680 IPC_MESSAGE_HANDLER(ViewMsg_SpellChecker_EnableAutoSpellCorrect, | 680 IPC_MESSAGE_HANDLER(ViewMsg_SpellChecker_EnableAutoSpellCorrect, |
681 OnSpellCheckEnableAutoSpellCorrect) | 681 OnSpellCheckEnableAutoSpellCorrect) |
682 IPC_MESSAGE_HANDLER(ViewMsg_GpuChannelEstablished, OnGpuChannelEstablished) | 682 IPC_MESSAGE_HANDLER(GpuMsg_GpuChannelEstablished, OnGpuChannelEstablished) |
683 IPC_MESSAGE_HANDLER(ViewMsg_SetPhishingModel, OnSetPhishingModel) | 683 IPC_MESSAGE_HANDLER(ViewMsg_SetPhishingModel, OnSetPhishingModel) |
684 IPC_MESSAGE_UNHANDLED(handled = false) | 684 IPC_MESSAGE_UNHANDLED(handled = false) |
685 IPC_END_MESSAGE_MAP() | 685 IPC_END_MESSAGE_MAP() |
686 return handled; | 686 return handled; |
687 } | 687 } |
688 | 688 |
689 void RenderThread::OnSetNextPageID(int32 next_page_id) { | 689 void RenderThread::OnSetNextPageID(int32 next_page_id) { |
690 // This should only be called at process initialization time, so we shouldn't | 690 // This should only be called at process initialization time, so we shouldn't |
691 // have to worry about thread-safety. | 691 // have to worry about thread-safety. |
692 RenderView::SetNextPageID(next_page_id); | 692 RenderView::SetNextPageID(next_page_id); |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1166 } | 1166 } |
1167 | 1167 |
1168 return false; | 1168 return false; |
1169 } | 1169 } |
1170 | 1170 |
1171 void RenderThread::RegisterExtension(v8::Extension* extension, | 1171 void RenderThread::RegisterExtension(v8::Extension* extension, |
1172 bool restrict_to_extensions) { | 1172 bool restrict_to_extensions) { |
1173 WebScriptController::registerExtension(extension); | 1173 WebScriptController::registerExtension(extension); |
1174 v8_extensions_[extension->name()] = restrict_to_extensions; | 1174 v8_extensions_[extension->name()] = restrict_to_extensions; |
1175 } | 1175 } |
OLD | NEW |