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 #include "content/browser/renderer_host/render_view_host_impl.h" | 5 #include "content/browser/renderer_host/render_view_host_impl.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1095 IPC_MESSAGE_HANDLER(ViewHostMsg_RouteMessageEvent, OnRouteMessageEvent) | 1095 IPC_MESSAGE_HANDLER(ViewHostMsg_RouteMessageEvent, OnRouteMessageEvent) |
1096 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunJavaScriptMessage, | 1096 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunJavaScriptMessage, |
1097 OnRunJavaScriptMessage) | 1097 OnRunJavaScriptMessage) |
1098 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunBeforeUnloadConfirm, | 1098 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunBeforeUnloadConfirm, |
1099 OnRunBeforeUnloadConfirm) | 1099 OnRunBeforeUnloadConfirm) |
1100 IPC_MESSAGE_HANDLER(DragHostMsg_StartDragging, OnStartDragging) | 1100 IPC_MESSAGE_HANDLER(DragHostMsg_StartDragging, OnStartDragging) |
1101 IPC_MESSAGE_HANDLER(DragHostMsg_UpdateDragCursor, OnUpdateDragCursor) | 1101 IPC_MESSAGE_HANDLER(DragHostMsg_UpdateDragCursor, OnUpdateDragCursor) |
1102 IPC_MESSAGE_HANDLER(DragHostMsg_TargetDrop_ACK, OnTargetDropACK) | 1102 IPC_MESSAGE_HANDLER(DragHostMsg_TargetDrop_ACK, OnTargetDropACK) |
1103 IPC_MESSAGE_HANDLER(ViewHostMsg_TakeFocus, OnTakeFocus) | 1103 IPC_MESSAGE_HANDLER(ViewHostMsg_TakeFocus, OnTakeFocus) |
1104 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnFocusedNodeChanged) | 1104 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnFocusedNodeChanged) |
1105 IPC_MESSAGE_HANDLER(ViewHostMsg_AddMessageToConsole, OnAddMessageToConsole) | |
1106 IPC_MESSAGE_HANDLER(ViewHostMsg_ClosePage_ACK, OnClosePageACK) | 1105 IPC_MESSAGE_HANDLER(ViewHostMsg_ClosePage_ACK, OnClosePageACK) |
1107 #if defined(OS_ANDROID) | 1106 #if defined(OS_ANDROID) |
1108 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionRootBoundsChanged, | 1107 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionRootBoundsChanged, |
1109 OnSelectionRootBoundsChanged) | 1108 OnSelectionRootBoundsChanged) |
1110 #endif | 1109 #endif |
1111 IPC_MESSAGE_HANDLER(ViewHostMsg_DidZoomURL, OnDidZoomURL) | 1110 IPC_MESSAGE_HANDLER(ViewHostMsg_DidZoomURL, OnDidZoomURL) |
1112 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_RequestPermission, | 1111 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_RequestPermission, |
1113 OnRequestDesktopNotificationPermission) | 1112 OnRequestDesktopNotificationPermission) |
1114 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Show, | 1113 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Show, |
1115 OnShowDesktopNotification) | 1114 OnShowDesktopNotification) |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1487 base::Bind(base::IgnoreResult(&DismissVirtualKeyboardTask)), | 1486 base::Bind(base::IgnoreResult(&DismissVirtualKeyboardTask)), |
1488 TimeDelta::FromMilliseconds(kVirtualKeyboardDisplayWaitTimeoutMs)); | 1487 TimeDelta::FromMilliseconds(kVirtualKeyboardDisplayWaitTimeoutMs)); |
1489 } | 1488 } |
1490 #endif | 1489 #endif |
1491 NotificationService::current()->Notify( | 1490 NotificationService::current()->Notify( |
1492 NOTIFICATION_FOCUS_CHANGED_IN_PAGE, | 1491 NOTIFICATION_FOCUS_CHANGED_IN_PAGE, |
1493 Source<RenderViewHost>(this), | 1492 Source<RenderViewHost>(this), |
1494 Details<const bool>(&is_editable_node)); | 1493 Details<const bool>(&is_editable_node)); |
1495 } | 1494 } |
1496 | 1495 |
1497 void RenderViewHostImpl::OnAddMessageToConsole( | |
1498 int32 level, | |
1499 const base::string16& message, | |
1500 int32 line_no, | |
1501 const base::string16& source_id) { | |
1502 if (delegate_->AddMessageToConsole(level, message, line_no, source_id)) | |
1503 return; | |
1504 | |
1505 // Pass through log level only on WebUI pages to limit console spew. | |
1506 int32 resolved_level = HasWebUIScheme(delegate_->GetURL()) ? level : 0; | |
1507 | |
1508 if (resolved_level >= ::logging::GetMinLogLevel()) { | |
1509 logging::LogMessage("CONSOLE", line_no, resolved_level).stream() << "\"" << | |
1510 message << "\", source: " << source_id << " (" << line_no << ")"; | |
1511 } | |
1512 } | |
1513 | |
1514 void RenderViewHostImpl::OnUserGesture() { | 1496 void RenderViewHostImpl::OnUserGesture() { |
1515 delegate_->OnUserGesture(); | 1497 delegate_->OnUserGesture(); |
1516 } | 1498 } |
1517 | 1499 |
1518 void RenderViewHostImpl::OnClosePageACK() { | 1500 void RenderViewHostImpl::OnClosePageACK() { |
1519 decrement_in_flight_event_count(); | 1501 decrement_in_flight_event_count(); |
1520 ClosePageIgnoringUnloadEvents(); | 1502 ClosePageIgnoringUnloadEvents(); |
1521 } | 1503 } |
1522 | 1504 |
1523 void RenderViewHostImpl::NotifyRendererUnresponsive() { | 1505 void RenderViewHostImpl::NotifyRendererUnresponsive() { |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1877 return true; | 1859 return true; |
1878 } | 1860 } |
1879 | 1861 |
1880 void RenderViewHostImpl::AttachToFrameTree() { | 1862 void RenderViewHostImpl::AttachToFrameTree() { |
1881 FrameTree* frame_tree = delegate_->GetFrameTree(); | 1863 FrameTree* frame_tree = delegate_->GetFrameTree(); |
1882 | 1864 |
1883 frame_tree->ResetForMainFrameSwap(); | 1865 frame_tree->ResetForMainFrameSwap(); |
1884 } | 1866 } |
1885 | 1867 |
1886 } // namespace content | 1868 } // namespace content |
OLD | NEW |