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 // Represents the browser side of the browser <--> renderer communication | 5 // Represents the browser side of the browser <--> renderer communication |
6 // channel. There will be one RenderProcessHost per renderer process. | 6 // channel. There will be one RenderProcessHost per renderer process. |
7 | 7 |
8 #include "chrome/browser/renderer_host/browser_render_process_host.h" | 8 #include "chrome/browser/renderer_host/browser_render_process_host.h" |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
849 | 849 |
850 return channel_->Send(msg); | 850 return channel_->Send(msg); |
851 } | 851 } |
852 | 852 |
853 void BrowserRenderProcessHost::OnMessageReceived(const IPC::Message& msg) { | 853 void BrowserRenderProcessHost::OnMessageReceived(const IPC::Message& msg) { |
854 // If we're about to be deleted, we can no longer trust that our profile is | 854 // If we're about to be deleted, we can no longer trust that our profile is |
855 // valid, so we ignore incoming messages. | 855 // valid, so we ignore incoming messages. |
856 if (deleting_soon_) | 856 if (deleting_soon_) |
857 return; | 857 return; |
858 | 858 |
| 859 #if defined(OS_CHROMEOS) |
| 860 // To troubleshoot crosbug.com/7327. |
| 861 CHECK(this); |
| 862 CHECK(&msg); |
| 863 #endif |
| 864 |
859 mark_child_process_activity_time(); | 865 mark_child_process_activity_time(); |
860 if (msg.routing_id() == MSG_ROUTING_CONTROL) { | 866 if (msg.routing_id() == MSG_ROUTING_CONTROL) { |
861 // Dispatch control messages. | 867 // Dispatch control messages. |
862 bool msg_is_ok = true; | 868 bool msg_is_ok = true; |
863 IPC_BEGIN_MESSAGE_MAP_EX(BrowserRenderProcessHost, msg, msg_is_ok) | 869 IPC_BEGIN_MESSAGE_MAP_EX(BrowserRenderProcessHost, msg, msg_is_ok) |
864 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdatedCacheStats, | 870 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdatedCacheStats, |
865 OnUpdatedCacheStats) | 871 OnUpdatedCacheStats) |
866 IPC_MESSAGE_HANDLER(ViewHostMsg_SuddenTerminationChanged, | 872 IPC_MESSAGE_HANDLER(ViewHostMsg_SuddenTerminationChanged, |
867 SuddenTerminationChanged); | 873 SuddenTerminationChanged); |
868 IPC_MESSAGE_HANDLER(ViewHostMsg_ExtensionAddListener, | 874 IPC_MESSAGE_HANDLER(ViewHostMsg_ExtensionAddListener, |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1140 IPC::InvalidPlatformFileForTransit(), | 1146 IPC::InvalidPlatformFileForTransit(), |
1141 std::vector<std::string>(), | 1147 std::vector<std::string>(), |
1142 std::string(), | 1148 std::string(), |
1143 false)); | 1149 false)); |
1144 } | 1150 } |
1145 } | 1151 } |
1146 | 1152 |
1147 void BrowserRenderProcessHost::EnableAutoSpellCorrect(bool enable) { | 1153 void BrowserRenderProcessHost::EnableAutoSpellCorrect(bool enable) { |
1148 Send(new ViewMsg_SpellChecker_EnableAutoSpellCorrect(enable)); | 1154 Send(new ViewMsg_SpellChecker_EnableAutoSpellCorrect(enable)); |
1149 } | 1155 } |
OLD | NEW |