| 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 "chrome/browser/renderer_host/render_view_host.h" | 5 #include "chrome/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 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 762 IPC_MESSAGE_HANDLER(ViewHostMsg_ContextMenu, OnMsgContextMenu) | 762 IPC_MESSAGE_HANDLER(ViewHostMsg_ContextMenu, OnMsgContextMenu) |
| 763 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenURL, OnMsgOpenURL) | 763 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenURL, OnMsgOpenURL) |
| 764 IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredSizeChange, | 764 IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredSizeChange, |
| 765 OnMsgDidContentsPreferredSizeChange) | 765 OnMsgDidContentsPreferredSizeChange) |
| 766 IPC_MESSAGE_HANDLER(ViewHostMsg_DomOperationResponse, | 766 IPC_MESSAGE_HANDLER(ViewHostMsg_DomOperationResponse, |
| 767 OnMsgDomOperationResponse) | 767 OnMsgDomOperationResponse) |
| 768 IPC_MESSAGE_HANDLER(ViewHostMsg_DOMUISend, OnMsgDOMUISend) | 768 IPC_MESSAGE_HANDLER(ViewHostMsg_DOMUISend, OnMsgDOMUISend) |
| 769 IPC_MESSAGE_HANDLER(ViewHostMsg_ForwardMessageToExternalHost, | 769 IPC_MESSAGE_HANDLER(ViewHostMsg_ForwardMessageToExternalHost, |
| 770 OnMsgForwardMessageToExternalHost) | 770 OnMsgForwardMessageToExternalHost) |
| 771 IPC_MESSAGE_HANDLER(ViewHostMsg_SetTooltipText, OnMsgSetTooltipText) | 771 IPC_MESSAGE_HANDLER(ViewHostMsg_SetTooltipText, OnMsgSetTooltipText) |
| 772 IPC_MESSAGE_HANDLER(ViewHostMsg_RegisterProtocolHandler, OnMsgRegisterProtoc
olHandler) |
| 772 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunJavaScriptMessage, | 773 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunJavaScriptMessage, |
| 773 OnMsgRunJavaScriptMessage) | 774 OnMsgRunJavaScriptMessage) |
| 774 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunBeforeUnloadConfirm, | 775 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunBeforeUnloadConfirm, |
| 775 OnMsgRunBeforeUnloadConfirm) | 776 OnMsgRunBeforeUnloadConfirm) |
| 776 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_ShowModalHTMLDialog, | 777 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_ShowModalHTMLDialog, |
| 777 OnMsgShowModalHTMLDialog) | 778 OnMsgShowModalHTMLDialog) |
| 778 IPC_MESSAGE_HANDLER(ViewHostMsg_StartDragging, OnMsgStartDragging) | 779 IPC_MESSAGE_HANDLER(ViewHostMsg_StartDragging, OnMsgStartDragging) |
| 779 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateDragCursor, OnUpdateDragCursor) | 780 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateDragCursor, OnUpdateDragCursor) |
| 780 IPC_MESSAGE_HANDLER(ViewHostMsg_TakeFocus, OnTakeFocus) | 781 IPC_MESSAGE_HANDLER(ViewHostMsg_TakeFocus, OnTakeFocus) |
| 781 IPC_MESSAGE_HANDLER(ViewHostMsg_PageHasOSDD, OnMsgPageHasOSDD) | 782 IPC_MESSAGE_HANDLER(ViewHostMsg_PageHasOSDD, OnMsgPageHasOSDD) |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1212 } | 1213 } |
| 1213 if (view()) | 1214 if (view()) |
| 1214 view()->SetTooltipText(wrapped_tooltip_text); | 1215 view()->SetTooltipText(wrapped_tooltip_text); |
| 1215 } | 1216 } |
| 1216 | 1217 |
| 1217 void RenderViewHost::OnMsgSelectionChanged(const std::string& text) { | 1218 void RenderViewHost::OnMsgSelectionChanged(const std::string& text) { |
| 1218 if (view()) | 1219 if (view()) |
| 1219 view()->SelectionChanged(text); | 1220 view()->SelectionChanged(text); |
| 1220 } | 1221 } |
| 1221 | 1222 |
| 1223 void RenderViewHost::OnMsgRegisterProtocolHandler(const std::string& protocol, c
onst std::string& url, const std::string& title) { |
| 1224 delegate_->RegisterProtocolHandler(protocol, url, title); |
| 1225 } |
| 1226 |
| 1222 void RenderViewHost::OnMsgRunJavaScriptMessage( | 1227 void RenderViewHost::OnMsgRunJavaScriptMessage( |
| 1223 const std::wstring& message, | 1228 const std::wstring& message, |
| 1224 const std::wstring& default_prompt, | 1229 const std::wstring& default_prompt, |
| 1225 const GURL& frame_url, | 1230 const GURL& frame_url, |
| 1226 const int flags, | 1231 const int flags, |
| 1227 IPC::Message* reply_msg) { | 1232 IPC::Message* reply_msg) { |
| 1228 // While a JS message dialog is showing, tabs in the same process shouldn't | 1233 // While a JS message dialog is showing, tabs in the same process shouldn't |
| 1229 // process input events. | 1234 // process input events. |
| 1230 process()->set_ignore_input_events(true); | 1235 process()->set_ignore_input_events(true); |
| 1231 StopHangMonitorTimeout(); | 1236 StopHangMonitorTimeout(); |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1715 LOG(DFATAL) << "Invalid checked state " << checked_state; | 1720 LOG(DFATAL) << "Invalid checked state " << checked_state; |
| 1716 return; | 1721 return; |
| 1717 } | 1722 } |
| 1718 | 1723 |
| 1719 CommandState state; | 1724 CommandState state; |
| 1720 state.is_enabled = is_enabled; | 1725 state.is_enabled = is_enabled; |
| 1721 state.checked_state = | 1726 state.checked_state = |
| 1722 static_cast<RenderViewCommandCheckedState>(checked_state); | 1727 static_cast<RenderViewCommandCheckedState>(checked_state); |
| 1723 command_states_[static_cast<RenderViewCommand>(command)] = state; | 1728 command_states_[static_cast<RenderViewCommand>(command)] = state; |
| 1724 } | 1729 } |
| OLD | NEW |