OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
767 OnMsgDidLoadResourceFromMemoryCache) | 767 OnMsgDidLoadResourceFromMemoryCache) |
768 IPC_MESSAGE_HANDLER(ViewHostMsg_DidRedirectProvisionalLoad, | 768 IPC_MESSAGE_HANDLER(ViewHostMsg_DidRedirectProvisionalLoad, |
769 OnMsgDidRedirectProvisionalLoad) | 769 OnMsgDidRedirectProvisionalLoad) |
770 IPC_MESSAGE_HANDLER(ViewHostMsg_DidStartProvisionalLoadForFrame, | 770 IPC_MESSAGE_HANDLER(ViewHostMsg_DidStartProvisionalLoadForFrame, |
771 OnMsgDidStartProvisionalLoadForFrame) | 771 OnMsgDidStartProvisionalLoadForFrame) |
772 IPC_MESSAGE_HANDLER(ViewHostMsg_DidFailProvisionalLoadWithError, | 772 IPC_MESSAGE_HANDLER(ViewHostMsg_DidFailProvisionalLoadWithError, |
773 OnMsgDidFailProvisionalLoadWithError) | 773 OnMsgDidFailProvisionalLoadWithError) |
774 IPC_MESSAGE_HANDLER(ViewHostMsg_Find_Reply, OnMsgFindReply) | 774 IPC_MESSAGE_HANDLER(ViewHostMsg_Find_Reply, OnMsgFindReply) |
775 IPC_MESSAGE_HANDLER(ViewMsg_DeterminePageText_Reply, | 775 IPC_MESSAGE_HANDLER(ViewMsg_DeterminePageText_Reply, |
776 OnDeterminePageTextReply) | 776 OnDeterminePageTextReply) |
| 777 IPC_MESSAGE_HANDLER(ViewMsg_ExecuteCodeFinished, |
| 778 OnExecuteCodeFinished) |
777 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateFavIconURL, OnMsgUpdateFavIconURL) | 779 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateFavIconURL, OnMsgUpdateFavIconURL) |
778 IPC_MESSAGE_HANDLER(ViewHostMsg_DidDownloadFavIcon, OnMsgDidDownloadFavIcon) | 780 IPC_MESSAGE_HANDLER(ViewHostMsg_DidDownloadFavIcon, OnMsgDidDownloadFavIcon) |
779 IPC_MESSAGE_HANDLER(ViewHostMsg_ContextMenu, OnMsgContextMenu) | 781 IPC_MESSAGE_HANDLER(ViewHostMsg_ContextMenu, OnMsgContextMenu) |
780 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenURL, OnMsgOpenURL) | 782 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenURL, OnMsgOpenURL) |
781 IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredWidthChange, | 783 IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredWidthChange, |
782 OnMsgDidContentsPreferredWidthChange) | 784 OnMsgDidContentsPreferredWidthChange) |
783 IPC_MESSAGE_HANDLER(ViewHostMsg_DomOperationResponse, | 785 IPC_MESSAGE_HANDLER(ViewHostMsg_DomOperationResponse, |
784 OnMsgDomOperationResponse) | 786 OnMsgDomOperationResponse) |
785 IPC_MESSAGE_HANDLER(ViewHostMsg_DOMUISend, | 787 IPC_MESSAGE_HANDLER(ViewHostMsg_DOMUISend, |
786 OnMsgDOMUISend) | 788 OnMsgDOMUISend) |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1120 DetectLanguageOfUnicodeText(page_text.c_str(), true, &is_reliable, | 1122 DetectLanguageOfUnicodeText(page_text.c_str(), true, &is_reliable, |
1121 &num_languages, NULL)); | 1123 &num_languages, NULL)); |
1122 std::string language(language_iso_code); | 1124 std::string language(language_iso_code); |
1123 NotificationService::current()->Notify( | 1125 NotificationService::current()->Notify( |
1124 NotificationType::TAB_LANGUAGE_DETERMINED, | 1126 NotificationType::TAB_LANGUAGE_DETERMINED, |
1125 Source<RenderViewHost>(this), | 1127 Source<RenderViewHost>(this), |
1126 Details<std::string>(&language)); | 1128 Details<std::string>(&language)); |
1127 #endif | 1129 #endif |
1128 } | 1130 } |
1129 | 1131 |
| 1132 void RenderViewHost::OnExecuteCodeFinished(int request_id, bool success) { |
| 1133 std::pair<int, bool> result_details(request_id, success); |
| 1134 NotificationService::current()->Notify( |
| 1135 NotificationType::TAB_CODE_EXECUTED, |
| 1136 NotificationService::AllSources(), |
| 1137 Details<std::pair<int, bool> >(&result_details)); |
| 1138 } |
| 1139 |
1130 void RenderViewHost::OnMsgUpdateFavIconURL(int32 page_id, | 1140 void RenderViewHost::OnMsgUpdateFavIconURL(int32 page_id, |
1131 const GURL& icon_url) { | 1141 const GURL& icon_url) { |
1132 RenderViewHostDelegate::FavIcon* favicon_delegate = | 1142 RenderViewHostDelegate::FavIcon* favicon_delegate = |
1133 delegate_->GetFavIconDelegate(); | 1143 delegate_->GetFavIconDelegate(); |
1134 if (favicon_delegate) | 1144 if (favicon_delegate) |
1135 favicon_delegate->UpdateFavIconURL(this, page_id, icon_url); | 1145 favicon_delegate->UpdateFavIconURL(this, page_id, icon_url); |
1136 } | 1146 } |
1137 | 1147 |
1138 void RenderViewHost::OnMsgDidDownloadFavIcon(int id, | 1148 void RenderViewHost::OnMsgDidDownloadFavIcon(int id, |
1139 const GURL& image_url, | 1149 const GURL& image_url, |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1673 } | 1683 } |
1674 | 1684 |
1675 void RenderViewHost::ResetModalDialogEvent() { | 1685 void RenderViewHost::ResetModalDialogEvent() { |
1676 if (--modal_dialog_count_ == 0) | 1686 if (--modal_dialog_count_ == 0) |
1677 modal_dialog_event_->Reset(); | 1687 modal_dialog_event_->Reset(); |
1678 } | 1688 } |
1679 | 1689 |
1680 void RenderViewHost::UpdateBrowserWindowId(int window_id) { | 1690 void RenderViewHost::UpdateBrowserWindowId(int window_id) { |
1681 Send(new ViewMsg_UpdateBrowserWindowId(routing_id(), window_id)); | 1691 Send(new ViewMsg_UpdateBrowserWindowId(routing_id(), window_id)); |
1682 } | 1692 } |
OLD | NEW |