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, | |
773 OnMsgRegisterProtocolHandler) | |
772 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunJavaScriptMessage, | 774 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunJavaScriptMessage, |
773 OnMsgRunJavaScriptMessage) | 775 OnMsgRunJavaScriptMessage) |
774 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunBeforeUnloadConfirm, | 776 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunBeforeUnloadConfirm, |
775 OnMsgRunBeforeUnloadConfirm) | 777 OnMsgRunBeforeUnloadConfirm) |
776 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_ShowModalHTMLDialog, | 778 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_ShowModalHTMLDialog, |
777 OnMsgShowModalHTMLDialog) | 779 OnMsgShowModalHTMLDialog) |
778 IPC_MESSAGE_HANDLER(ViewHostMsg_StartDragging, OnMsgStartDragging) | 780 IPC_MESSAGE_HANDLER(ViewHostMsg_StartDragging, OnMsgStartDragging) |
779 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateDragCursor, OnUpdateDragCursor) | 781 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateDragCursor, OnUpdateDragCursor) |
780 IPC_MESSAGE_HANDLER(ViewHostMsg_TakeFocus, OnTakeFocus) | 782 IPC_MESSAGE_HANDLER(ViewHostMsg_TakeFocus, OnTakeFocus) |
781 IPC_MESSAGE_HANDLER(ViewHostMsg_PageHasOSDD, OnMsgPageHasOSDD) | 783 IPC_MESSAGE_HANDLER(ViewHostMsg_PageHasOSDD, OnMsgPageHasOSDD) |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1212 } | 1214 } |
1213 if (view()) | 1215 if (view()) |
1214 view()->SetTooltipText(wrapped_tooltip_text); | 1216 view()->SetTooltipText(wrapped_tooltip_text); |
1215 } | 1217 } |
1216 | 1218 |
1217 void RenderViewHost::OnMsgSelectionChanged(const std::string& text) { | 1219 void RenderViewHost::OnMsgSelectionChanged(const std::string& text) { |
1218 if (view()) | 1220 if (view()) |
1219 view()->SelectionChanged(text); | 1221 view()->SelectionChanged(text); |
1220 } | 1222 } |
1221 | 1223 |
1224 void RenderViewHost::OnMsgRegisterProtocolHandler(const std::string& protocol, | |
1225 const GURL& url, | |
1226 const string16& title) { | |
1227 delegate_->RegisterProtocolHandler(protocol, url, title); | |
jam
2011/02/15 18:48:39
there's no point in dispatching the message just t
koz (OOO until 15th September)
2011/02/16 03:37:48
Done.
| |
1228 } | |
1229 | |
1222 void RenderViewHost::OnMsgRunJavaScriptMessage( | 1230 void RenderViewHost::OnMsgRunJavaScriptMessage( |
1223 const std::wstring& message, | 1231 const std::wstring& message, |
1224 const std::wstring& default_prompt, | 1232 const std::wstring& default_prompt, |
1225 const GURL& frame_url, | 1233 const GURL& frame_url, |
1226 const int flags, | 1234 const int flags, |
1227 IPC::Message* reply_msg) { | 1235 IPC::Message* reply_msg) { |
1228 // While a JS message dialog is showing, tabs in the same process shouldn't | 1236 // While a JS message dialog is showing, tabs in the same process shouldn't |
1229 // process input events. | 1237 // process input events. |
1230 process()->set_ignore_input_events(true); | 1238 process()->set_ignore_input_events(true); |
1231 StopHangMonitorTimeout(); | 1239 StopHangMonitorTimeout(); |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1715 LOG(DFATAL) << "Invalid checked state " << checked_state; | 1723 LOG(DFATAL) << "Invalid checked state " << checked_state; |
1716 return; | 1724 return; |
1717 } | 1725 } |
1718 | 1726 |
1719 CommandState state; | 1727 CommandState state; |
1720 state.is_enabled = is_enabled; | 1728 state.is_enabled = is_enabled; |
1721 state.checked_state = | 1729 state.checked_state = |
1722 static_cast<RenderViewCommandCheckedState>(checked_state); | 1730 static_cast<RenderViewCommandCheckedState>(checked_state); |
1723 command_states_[static_cast<RenderViewCommand>(command)] = state; | 1731 command_states_[static_cast<RenderViewCommand>(command)] = state; |
1724 } | 1732 } |
OLD | NEW |