| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/browser/renderer_host/render_view_host.h" | 5 #include "content/browser/renderer_host/render_view_host.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 IPC_MESSAGE_HANDLER(ViewHostMsg_DidZoomURL, OnDidZoomURL) | 711 IPC_MESSAGE_HANDLER(ViewHostMsg_DidZoomURL, OnDidZoomURL) |
| 712 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_RequestPermission, | 712 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_RequestPermission, |
| 713 OnRequestDesktopNotificationPermission) | 713 OnRequestDesktopNotificationPermission) |
| 714 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Show, | 714 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Show, |
| 715 OnShowDesktopNotification) | 715 OnShowDesktopNotification) |
| 716 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Cancel, | 716 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Cancel, |
| 717 OnCancelDesktopNotification) | 717 OnCancelDesktopNotification) |
| 718 #if defined(OS_MACOSX) | 718 #if defined(OS_MACOSX) |
| 719 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnMsgShowPopup) | 719 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnMsgShowPopup) |
| 720 #endif | 720 #endif |
| 721 IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnRunFileChooser) |
| 721 // Have the super handle all other messages. | 722 // Have the super handle all other messages. |
| 722 IPC_MESSAGE_UNHANDLED(handled = RenderWidgetHost::OnMessageReceived(msg)) | 723 IPC_MESSAGE_UNHANDLED(handled = RenderWidgetHost::OnMessageReceived(msg)) |
| 723 // NOTE: Do not add a message handler that just calls the delegate! | |
| 724 // Dispatch the message directly there instead. | |
| 725 IPC_END_MESSAGE_MAP_EX() | 724 IPC_END_MESSAGE_MAP_EX() |
| 726 | 725 |
| 727 if (!msg_is_ok) { | 726 if (!msg_is_ok) { |
| 728 // The message had a handler, but its de-serialization failed. | 727 // The message had a handler, but its de-serialization failed. |
| 729 // Kill the renderer. | 728 // Kill the renderer. |
| 730 UserMetrics::RecordAction(UserMetricsAction("BadMessageTerminate_RVH")); | 729 UserMetrics::RecordAction(UserMetricsAction("BadMessageTerminate_RVH")); |
| 731 process()->ReceivedBadMessage(); | 730 process()->ReceivedBadMessage(); |
| 732 } | 731 } |
| 733 | 732 |
| 734 return handled; | 733 return handled; |
| (...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1350 if (view) { | 1349 if (view) { |
| 1351 view->ShowPopupMenu(params.bounds, | 1350 view->ShowPopupMenu(params.bounds, |
| 1352 params.item_height, | 1351 params.item_height, |
| 1353 params.item_font_size, | 1352 params.item_font_size, |
| 1354 params.selected_item, | 1353 params.selected_item, |
| 1355 params.popup_items, | 1354 params.popup_items, |
| 1356 params.right_aligned); | 1355 params.right_aligned); |
| 1357 } | 1356 } |
| 1358 } | 1357 } |
| 1359 #endif | 1358 #endif |
| 1359 |
| 1360 void RenderViewHost::OnRunFileChooser( |
| 1361 const ViewHostMsg_RunFileChooser_Params& params) { |
| 1362 delegate_->RunFileChooser(this, params); |
| 1363 } |
| 1364 |
| OLD | NEW |