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) | |
722 | |
721 // Have the super handle all other messages. | 723 // Have the super handle all other messages. |
722 IPC_MESSAGE_UNHANDLED(handled = RenderWidgetHost::OnMessageReceived(msg)) | 724 IPC_MESSAGE_UNHANDLED(handled = RenderWidgetHost::OnMessageReceived(msg)) |
723 // NOTE: Do not add a message handler that just calls the delegate! | 725 |
jam
2011/08/24 20:30:29
why add this blank line? and also above
ananta
2011/08/24 20:38:05
Removed both lines
| |
726 // NOTE: Do not add a message handler that just calls the delegate!, | |
724 // Dispatch the message directly there instead. | 727 // Dispatch the message directly there instead. |
728 // This does not apply to messages sent by content. | |
jam
2011/08/24 20:30:29
if you add this line, please explain why that's th
ananta
2011/08/24 20:38:05
I removed the whole comment as delegates can live
| |
725 IPC_END_MESSAGE_MAP_EX() | 729 IPC_END_MESSAGE_MAP_EX() |
726 | 730 |
727 if (!msg_is_ok) { | 731 if (!msg_is_ok) { |
728 // The message had a handler, but its de-serialization failed. | 732 // The message had a handler, but its de-serialization failed. |
729 // Kill the renderer. | 733 // Kill the renderer. |
730 UserMetrics::RecordAction(UserMetricsAction("BadMessageTerminate_RVH")); | 734 UserMetrics::RecordAction(UserMetricsAction("BadMessageTerminate_RVH")); |
731 process()->ReceivedBadMessage(); | 735 process()->ReceivedBadMessage(); |
732 } | 736 } |
733 | 737 |
734 return handled; | 738 return handled; |
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1350 if (view) { | 1354 if (view) { |
1351 view->ShowPopupMenu(params.bounds, | 1355 view->ShowPopupMenu(params.bounds, |
1352 params.item_height, | 1356 params.item_height, |
1353 params.item_font_size, | 1357 params.item_font_size, |
1354 params.selected_item, | 1358 params.selected_item, |
1355 params.popup_items, | 1359 params.popup_items, |
1356 params.right_aligned); | 1360 params.right_aligned); |
1357 } | 1361 } |
1358 } | 1362 } |
1359 #endif | 1363 #endif |
1364 | |
1365 void RenderViewHost::OnRunFileChooser( | |
1366 const ViewHostMsg_RunFileChooser_Params& params) { | |
1367 delegate_->RunFileChooser(this, params); | |
1368 } | |
1369 | |
OLD | NEW |