| OLD | NEW |
| 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 // 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 "content/browser/renderer_host/render_process_host_impl.h" | 8 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1213 IPC_MESSAGE_HANDLER(ChildProcessHostMsg_DumpHandlesDone, | 1213 IPC_MESSAGE_HANDLER(ChildProcessHostMsg_DumpHandlesDone, |
| 1214 OnDumpHandlesDone) | 1214 OnDumpHandlesDone) |
| 1215 IPC_MESSAGE_HANDLER(ViewHostMsg_SuddenTerminationChanged, | 1215 IPC_MESSAGE_HANDLER(ViewHostMsg_SuddenTerminationChanged, |
| 1216 SuddenTerminationChanged) | 1216 SuddenTerminationChanged) |
| 1217 IPC_MESSAGE_HANDLER(ViewHostMsg_UserMetricsRecordAction, | 1217 IPC_MESSAGE_HANDLER(ViewHostMsg_UserMetricsRecordAction, |
| 1218 OnUserMetricsRecordAction) | 1218 OnUserMetricsRecordAction) |
| 1219 IPC_MESSAGE_HANDLER(ViewHostMsg_SavedPageAsMHTML, OnSavedPageAsMHTML) | 1219 IPC_MESSAGE_HANDLER(ViewHostMsg_SavedPageAsMHTML, OnSavedPageAsMHTML) |
| 1220 // Adding single handlers for your service here is fine, but once your | 1220 // Adding single handlers for your service here is fine, but once your |
| 1221 // service needs more than one handler, please extract them into a new | 1221 // service needs more than one handler, please extract them into a new |
| 1222 // message filter and add that filter to CreateMessageFilters(). | 1222 // message filter and add that filter to CreateMessageFilters(). |
| 1223 IPC_MESSAGE_UNHANDLED_ERROR() | |
| 1224 IPC_END_MESSAGE_MAP_EX() | 1223 IPC_END_MESSAGE_MAP_EX() |
| 1225 | 1224 |
| 1226 if (!msg_is_ok) { | 1225 if (!msg_is_ok) { |
| 1227 // The message had a handler, but its de-serialization failed. | 1226 // The message had a handler, but its de-serialization failed. |
| 1228 // We consider this a capital crime. Kill the renderer if we have one. | 1227 // We consider this a capital crime. Kill the renderer if we have one. |
| 1229 LOG(ERROR) << "bad message " << msg.type() << " terminating renderer."; | 1228 LOG(ERROR) << "bad message " << msg.type() << " terminating renderer."; |
| 1230 RecordAction(UserMetricsAction("BadMessageTerminate_BRPH")); | 1229 RecordAction(UserMetricsAction("BadMessageTerminate_BRPH")); |
| 1231 ReceivedBadMessage(); | 1230 ReceivedBadMessage(); |
| 1232 } | 1231 } |
| 1233 return true; | 1232 return true; |
| (...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1772 // Skip widgets in other processes. | 1771 // Skip widgets in other processes. |
| 1773 if (widgets[i]->GetProcess()->GetID() != GetID()) | 1772 if (widgets[i]->GetProcess()->GetID() != GetID()) |
| 1774 continue; | 1773 continue; |
| 1775 | 1774 |
| 1776 RenderViewHost* rvh = RenderViewHost::From(widgets[i]); | 1775 RenderViewHost* rvh = RenderViewHost::From(widgets[i]); |
| 1777 rvh->UpdateWebkitPreferences(rvh->GetWebkitPreferences()); | 1776 rvh->UpdateWebkitPreferences(rvh->GetWebkitPreferences()); |
| 1778 } | 1777 } |
| 1779 } | 1778 } |
| 1780 | 1779 |
| 1781 } // namespace content | 1780 } // namespace content |
| OLD | NEW |