| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/gfx/native_widget_types.h" | 10 #include "base/gfx/native_widget_types.h" |
| (...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 754 OnReceivedSerializedHtmlData); | 754 OnReceivedSerializedHtmlData); |
| 755 IPC_MESSAGE_HANDLER(ViewHostMsg_DidGetApplicationInfo, | 755 IPC_MESSAGE_HANDLER(ViewHostMsg_DidGetApplicationInfo, |
| 756 OnDidGetApplicationInfo); | 756 OnDidGetApplicationInfo); |
| 757 IPC_MESSAGE_FORWARD(ViewHostMsg_JSOutOfMemory, delegate_, | 757 IPC_MESSAGE_FORWARD(ViewHostMsg_JSOutOfMemory, delegate_, |
| 758 RenderViewHostDelegate::OnJSOutOfMemory); | 758 RenderViewHostDelegate::OnJSOutOfMemory); |
| 759 IPC_MESSAGE_HANDLER(ViewHostMsg_ShouldClose_ACK, OnMsgShouldCloseACK); | 759 IPC_MESSAGE_HANDLER(ViewHostMsg_ShouldClose_ACK, OnMsgShouldCloseACK); |
| 760 IPC_MESSAGE_HANDLER(ViewHostMsg_UnloadListenerChanged, | 760 IPC_MESSAGE_HANDLER(ViewHostMsg_UnloadListenerChanged, |
| 761 OnUnloadListenerChanged); | 761 OnUnloadListenerChanged); |
| 762 IPC_MESSAGE_HANDLER(ViewHostMsg_QueryFormFieldAutofill, | 762 IPC_MESSAGE_HANDLER(ViewHostMsg_QueryFormFieldAutofill, |
| 763 OnQueryFormFieldAutofill) | 763 OnQueryFormFieldAutofill) |
| 764 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateFeedList, OnMsgUpdateFeedList) |
| 764 // Have the super handle all other messages. | 765 // Have the super handle all other messages. |
| 765 IPC_MESSAGE_UNHANDLED(RenderWidgetHost::OnMessageReceived(msg)) | 766 IPC_MESSAGE_UNHANDLED(RenderWidgetHost::OnMessageReceived(msg)) |
| 766 IPC_END_MESSAGE_MAP_EX() | 767 IPC_END_MESSAGE_MAP_EX() |
| 767 | 768 |
| 768 if (!msg_is_ok) { | 769 if (!msg_is_ok) { |
| 769 // The message had a handler, but its de-serialization failed. | 770 // The message had a handler, but its de-serialization failed. |
| 770 // Kill the renderer. | 771 // Kill the renderer. |
| 771 process()->ReceivedBadMessage(msg.type()); | 772 process()->ReceivedBadMessage(msg.type()); |
| 772 } | 773 } |
| 773 } | 774 } |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 890 void RenderViewHost::OnMsgUpdateState(int32 page_id, | 891 void RenderViewHost::OnMsgUpdateState(int32 page_id, |
| 891 const std::string& state) { | 892 const std::string& state) { |
| 892 delegate_->UpdateState(this, page_id, state); | 893 delegate_->UpdateState(this, page_id, state); |
| 893 } | 894 } |
| 894 | 895 |
| 895 void RenderViewHost::OnMsgUpdateTitle(int32 page_id, | 896 void RenderViewHost::OnMsgUpdateTitle(int32 page_id, |
| 896 const std::wstring& title) { | 897 const std::wstring& title) { |
| 897 delegate_->UpdateTitle(this, page_id, title); | 898 delegate_->UpdateTitle(this, page_id, title); |
| 898 } | 899 } |
| 899 | 900 |
| 901 void RenderViewHost::OnMsgUpdateFeedList( |
| 902 const ViewHostMsg_UpdateFeedList_Params& params) { |
| 903 delegate_->UpdateFeedList(this, params); |
| 904 } |
| 905 |
| 900 void RenderViewHost::OnMsgUpdateEncoding(const std::wstring& encoding_name) { | 906 void RenderViewHost::OnMsgUpdateEncoding(const std::wstring& encoding_name) { |
| 901 delegate_->UpdateEncoding(this, encoding_name); | 907 delegate_->UpdateEncoding(this, encoding_name); |
| 902 } | 908 } |
| 903 | 909 |
| 904 void RenderViewHost::OnMsgUpdateTargetURL(int32 page_id, | 910 void RenderViewHost::OnMsgUpdateTargetURL(int32 page_id, |
| 905 const GURL& url) { | 911 const GURL& url) { |
| 906 delegate_->UpdateTargetURL(page_id, url); | 912 delegate_->UpdateTargetURL(page_id, url); |
| 907 | 913 |
| 908 // Send a notification back to the renderer that we are ready to | 914 // Send a notification back to the renderer that we are ready to |
| 909 // receive more target urls. | 915 // receive more target urls. |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1336 Send(new ViewMsg_PersonalizationEvent(routing_id(), event_name, event_arg)); | 1342 Send(new ViewMsg_PersonalizationEvent(routing_id(), event_name, event_arg)); |
| 1337 } | 1343 } |
| 1338 #endif | 1344 #endif |
| 1339 | 1345 |
| 1340 void RenderViewHost::ForwardMessageFromExternalHost(const std::string& message, | 1346 void RenderViewHost::ForwardMessageFromExternalHost(const std::string& message, |
| 1341 const std::string& origin, | 1347 const std::string& origin, |
| 1342 const std::string& target) { | 1348 const std::string& target) { |
| 1343 Send(new ViewMsg_HandleMessageFromExternalHost(routing_id(), message, origin, | 1349 Send(new ViewMsg_HandleMessageFromExternalHost(routing_id(), message, origin, |
| 1344 target)); | 1350 target)); |
| 1345 } | 1351 } |
| OLD | NEW |