| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 #include "content/child/web_url_request_util.h" | 46 #include "content/child/web_url_request_util.h" |
| 47 #include "content/child/webmessageportchannel_impl.h" | 47 #include "content/child/webmessageportchannel_impl.h" |
| 48 #include "content/child/websocket_bridge.h" | 48 #include "content/child/websocket_bridge.h" |
| 49 #include "content/child/weburlresponse_extradata_impl.h" | 49 #include "content/child/weburlresponse_extradata_impl.h" |
| 50 #include "content/common/accessibility_messages.h" | 50 #include "content/common/accessibility_messages.h" |
| 51 #include "content/common/clipboard_messages.h" | 51 #include "content/common/clipboard_messages.h" |
| 52 #include "content/common/frame_messages.h" | 52 #include "content/common/frame_messages.h" |
| 53 #include "content/common/frame_replication_state.h" | 53 #include "content/common/frame_replication_state.h" |
| 54 #include "content/common/input_messages.h" | 54 #include "content/common/input_messages.h" |
| 55 #include "content/common/navigation_params.h" | 55 #include "content/common/navigation_params.h" |
| 56 #include "content/common/page_messages.h" |
| 56 #include "content/common/savable_subframe.h" | 57 #include "content/common/savable_subframe.h" |
| 57 #include "content/common/service_worker/service_worker_types.h" | 58 #include "content/common/service_worker/service_worker_types.h" |
| 58 #include "content/common/site_isolation_policy.h" | 59 #include "content/common/site_isolation_policy.h" |
| 59 #include "content/common/ssl_status_serialization.h" | 60 #include "content/common/ssl_status_serialization.h" |
| 60 #include "content/common/swapped_out_messages.h" | 61 #include "content/common/swapped_out_messages.h" |
| 61 #include "content/common/view_messages.h" | 62 #include "content/common/view_messages.h" |
| 62 #include "content/public/common/bindings_policy.h" | 63 #include "content/public/common/bindings_policy.h" |
| 63 #include "content/public/common/browser_side_navigation_policy.h" | 64 #include "content/public/common/browser_side_navigation_policy.h" |
| 64 #include "content/public/common/content_constants.h" | 65 #include "content/public/common/content_constants.h" |
| 65 #include "content/public/common/content_switches.h" | 66 #include "content/public/common/content_switches.h" |
| (...skipping 1277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1343 | 1344 |
| 1344 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 1345 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
| 1345 void RenderFrameImpl::DidHideExternalPopupMenu() { | 1346 void RenderFrameImpl::DidHideExternalPopupMenu() { |
| 1346 // We need to clear external_popup_menu_ as soon as ExternalPopupMenu::close | 1347 // We need to clear external_popup_menu_ as soon as ExternalPopupMenu::close |
| 1347 // is called. Otherwise, createExternalPopupMenu() for new popup will fail. | 1348 // is called. Otherwise, createExternalPopupMenu() for new popup will fail. |
| 1348 external_popup_menu_.reset(); | 1349 external_popup_menu_.reset(); |
| 1349 } | 1350 } |
| 1350 #endif | 1351 #endif |
| 1351 | 1352 |
| 1352 bool RenderFrameImpl::OnMessageReceived(const IPC::Message& msg) { | 1353 bool RenderFrameImpl::OnMessageReceived(const IPC::Message& msg) { |
| 1354 // Forward Page IPCs to the RenderView. |
| 1355 if ((IPC_MESSAGE_CLASS(msg) == PageMsgStart)) { |
| 1356 if (render_view()) |
| 1357 return render_view()->OnMessageReceived(msg); |
| 1358 |
| 1359 return false; |
| 1360 } |
| 1361 |
| 1353 // We may get here while detaching, when the WebFrame has been deleted. Do | 1362 // We may get here while detaching, when the WebFrame has been deleted. Do |
| 1354 // not process any messages in this state. | 1363 // not process any messages in this state. |
| 1355 if (!frame_) | 1364 if (!frame_) |
| 1356 return false; | 1365 return false; |
| 1357 | 1366 |
| 1358 // TODO(kenrb): document() should not be null, but as a transitional step | 1367 // TODO(kenrb): document() should not be null, but as a transitional step |
| 1359 // we have RenderFrameProxy 'wrapping' a RenderFrameImpl, passing messages | 1368 // we have RenderFrameProxy 'wrapping' a RenderFrameImpl, passing messages |
| 1360 // to this method. This happens for a top-level remote frame, where a | 1369 // to this method. This happens for a top-level remote frame, where a |
| 1361 // document-less RenderFrame is replaced by a RenderFrameProxy but kept | 1370 // document-less RenderFrame is replaced by a RenderFrameProxy but kept |
| 1362 // around and is still able to receive messages. | 1371 // around and is still able to receive messages. |
| (...skipping 4763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6126 int match_count, | 6135 int match_count, |
| 6127 int ordinal, | 6136 int ordinal, |
| 6128 const WebRect& selection_rect, | 6137 const WebRect& selection_rect, |
| 6129 bool final_status_update) { | 6138 bool final_status_update) { |
| 6130 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, | 6139 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, |
| 6131 selection_rect, ordinal, | 6140 selection_rect, ordinal, |
| 6132 final_status_update)); | 6141 final_status_update)); |
| 6133 } | 6142 } |
| 6134 | 6143 |
| 6135 } // namespace content | 6144 } // namespace content |
| OLD | NEW |