OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser/renderer_host/render_view_host_impl.h" | 5 #include "content/browser/renderer_host/render_view_host_impl.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
993 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeLoadProgress, | 993 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeLoadProgress, |
994 OnMsgDidChangeLoadProgress) | 994 OnMsgDidChangeLoadProgress) |
995 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentAvailableInMainFrame, | 995 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentAvailableInMainFrame, |
996 OnMsgDocumentAvailableInMainFrame) | 996 OnMsgDocumentAvailableInMainFrame) |
997 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentOnLoadCompletedInMainFrame, | 997 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentOnLoadCompletedInMainFrame, |
998 OnMsgDocumentOnLoadCompletedInMainFrame) | 998 OnMsgDocumentOnLoadCompletedInMainFrame) |
999 IPC_MESSAGE_HANDLER(ViewHostMsg_ContextMenu, OnMsgContextMenu) | 999 IPC_MESSAGE_HANDLER(ViewHostMsg_ContextMenu, OnMsgContextMenu) |
1000 IPC_MESSAGE_HANDLER(ViewHostMsg_ToggleFullscreen, | 1000 IPC_MESSAGE_HANDLER(ViewHostMsg_ToggleFullscreen, |
1001 OnMsgToggleFullscreen) | 1001 OnMsgToggleFullscreen) |
1002 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenURL, OnMsgOpenURL) | 1002 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenURL, OnMsgOpenURL) |
| 1003 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenPostURL, OnMsgOpenPostURL) |
1003 IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredSizeChange, | 1004 IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredSizeChange, |
1004 OnMsgDidContentsPreferredSizeChange) | 1005 OnMsgDidContentsPreferredSizeChange) |
1005 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeScrollbarsForMainFrame, | 1006 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeScrollbarsForMainFrame, |
1006 OnMsgDidChangeScrollbarsForMainFrame) | 1007 OnMsgDidChangeScrollbarsForMainFrame) |
1007 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeScrollOffsetPinningForMainFrame, | 1008 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeScrollOffsetPinningForMainFrame, |
1008 OnMsgDidChangeScrollOffsetPinningForMainFrame) | 1009 OnMsgDidChangeScrollOffsetPinningForMainFrame) |
1009 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeNumWheelEvents, | 1010 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeNumWheelEvents, |
1010 OnMsgDidChangeNumWheelEvents) | 1011 OnMsgDidChangeNumWheelEvents) |
1011 IPC_MESSAGE_HANDLER(ViewHostMsg_RouteCloseEvent, | 1012 IPC_MESSAGE_HANDLER(ViewHostMsg_RouteCloseEvent, |
1012 OnMsgRouteCloseEvent) | 1013 OnMsgRouteCloseEvent) |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1368 WindowOpenDisposition disposition, | 1369 WindowOpenDisposition disposition, |
1369 int64 source_frame_id) { | 1370 int64 source_frame_id) { |
1370 GURL validated_url(url); | 1371 GURL validated_url(url); |
1371 FilterURL(ChildProcessSecurityPolicyImpl::GetInstance(), | 1372 FilterURL(ChildProcessSecurityPolicyImpl::GetInstance(), |
1372 GetProcess(), false, &validated_url); | 1373 GetProcess(), false, &validated_url); |
1373 | 1374 |
1374 delegate_->RequestOpenURL( | 1375 delegate_->RequestOpenURL( |
1375 this, validated_url, referrer, disposition, source_frame_id); | 1376 this, validated_url, referrer, disposition, source_frame_id); |
1376 } | 1377 } |
1377 | 1378 |
| 1379 void RenderViewHostImpl::OnMsgOpenPostURL( |
| 1380 const GURL& url, |
| 1381 const content::Referrer& referrer, |
| 1382 WindowOpenDisposition disposition, |
| 1383 int64 source_frame_id, |
| 1384 const ViewMsg_PostRequest_Params& request) { |
| 1385 GURL validated_url(url); |
| 1386 FilterURL(ChildProcessSecurityPolicyImpl::GetInstance(), |
| 1387 GetProcess(), false, &validated_url); |
| 1388 |
| 1389 delegate_->RequestOpenPostURL( |
| 1390 this, validated_url, referrer, disposition, |
| 1391 source_frame_id, request); |
| 1392 } |
| 1393 |
1378 void RenderViewHostImpl::OnMsgDidContentsPreferredSizeChange( | 1394 void RenderViewHostImpl::OnMsgDidContentsPreferredSizeChange( |
1379 const gfx::Size& new_size) { | 1395 const gfx::Size& new_size) { |
1380 delegate_->UpdatePreferredSize(new_size); | 1396 delegate_->UpdatePreferredSize(new_size); |
1381 } | 1397 } |
1382 | 1398 |
1383 void RenderViewHostImpl::OnRenderAutoResized(const gfx::Size& new_size) { | 1399 void RenderViewHostImpl::OnRenderAutoResized(const gfx::Size& new_size) { |
1384 delegate_->ResizeDueToAutoResize(new_size); | 1400 delegate_->ResizeDueToAutoResize(new_size); |
1385 } | 1401 } |
1386 | 1402 |
1387 void RenderViewHostImpl::OnMsgDidChangeScrollbarsForMainFrame( | 1403 void RenderViewHostImpl::OnMsgDidChangeScrollbarsForMainFrame( |
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2029 is_waiting_for_beforeunload_ack_ = false; | 2045 is_waiting_for_beforeunload_ack_ = false; |
2030 is_waiting_for_unload_ack_ = false; | 2046 is_waiting_for_unload_ack_ = false; |
2031 has_timed_out_on_unload_ = false; | 2047 has_timed_out_on_unload_ = false; |
2032 } | 2048 } |
2033 | 2049 |
2034 void RenderViewHostImpl::ClearPowerSaveBlockers() { | 2050 void RenderViewHostImpl::ClearPowerSaveBlockers() { |
2035 STLDeleteValues(&power_save_blockers_); | 2051 STLDeleteValues(&power_save_blockers_); |
2036 } | 2052 } |
2037 | 2053 |
2038 } // namespace content | 2054 } // namespace content |
OLD | NEW |