Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(409)

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 1811913003: PlzNavigate: support NavigationThrottle::WillProcessResponse (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1404 matching lines...) Expand 10 before | Expand all | Expand 10 after
1415 OnTextTrackSettingsChanged) 1415 OnTextTrackSettingsChanged)
1416 IPC_MESSAGE_HANDLER(FrameMsg_PostMessageEvent, OnPostMessageEvent) 1416 IPC_MESSAGE_HANDLER(FrameMsg_PostMessageEvent, OnPostMessageEvent)
1417 IPC_MESSAGE_HANDLER(FrameMsg_FailedNavigation, OnFailedNavigation) 1417 IPC_MESSAGE_HANDLER(FrameMsg_FailedNavigation, OnFailedNavigation)
1418 IPC_MESSAGE_HANDLER(FrameMsg_GetSavableResourceLinks, 1418 IPC_MESSAGE_HANDLER(FrameMsg_GetSavableResourceLinks,
1419 OnGetSavableResourceLinks) 1419 OnGetSavableResourceLinks)
1420 IPC_MESSAGE_HANDLER(FrameMsg_GetSerializedHtmlWithLocalLinks, 1420 IPC_MESSAGE_HANDLER(FrameMsg_GetSerializedHtmlWithLocalLinks,
1421 OnGetSerializedHtmlWithLocalLinks) 1421 OnGetSerializedHtmlWithLocalLinks)
1422 IPC_MESSAGE_HANDLER(FrameMsg_SerializeAsMHTML, OnSerializeAsMHTML) 1422 IPC_MESSAGE_HANDLER(FrameMsg_SerializeAsMHTML, OnSerializeAsMHTML)
1423 IPC_MESSAGE_HANDLER(FrameMsg_Find, OnFind) 1423 IPC_MESSAGE_HANDLER(FrameMsg_Find, OnFind)
1424 IPC_MESSAGE_HANDLER(FrameMsg_StopFinding, OnStopFinding) 1424 IPC_MESSAGE_HANDLER(FrameMsg_StopFinding, OnStopFinding)
1425 IPC_MESSAGE_HANDLER(FrameMsg_EnableViewSourceMode, OnEnableViewSourceMode)
1425 #if defined(OS_ANDROID) 1426 #if defined(OS_ANDROID)
1426 IPC_MESSAGE_HANDLER(InputMsg_ActivateNearestFindResult, 1427 IPC_MESSAGE_HANDLER(InputMsg_ActivateNearestFindResult,
1427 OnActivateNearestFindResult) 1428 OnActivateNearestFindResult)
1428 IPC_MESSAGE_HANDLER(FrameMsg_FindMatchRects, OnFindMatchRects) 1429 IPC_MESSAGE_HANDLER(FrameMsg_FindMatchRects, OnFindMatchRects)
1429 IPC_MESSAGE_HANDLER(FrameMsg_SelectPopupMenuItems, OnSelectPopupMenuItems) 1430 IPC_MESSAGE_HANDLER(FrameMsg_SelectPopupMenuItems, OnSelectPopupMenuItems)
1430 #elif defined(OS_MACOSX) 1431 #elif defined(OS_MACOSX)
1431 IPC_MESSAGE_HANDLER(FrameMsg_SelectPopupMenuItem, OnSelectPopupMenuItem) 1432 IPC_MESSAGE_HANDLER(FrameMsg_SelectPopupMenuItem, OnSelectPopupMenuItem)
1432 IPC_MESSAGE_HANDLER(InputMsg_CopyToFindPboard, OnCopyToFindPboard) 1433 IPC_MESSAGE_HANDLER(InputMsg_CopyToFindPboard, OnCopyToFindPboard)
1433 #endif 1434 #endif
1434 IPC_END_MESSAGE_MAP() 1435 IPC_END_MESSAGE_MAP()
(...skipping 3646 matching lines...) Expand 10 before | Expand all | Expand 10 after
5081 WebDocument doc = focused_frame->document(); 5082 WebDocument doc = focused_frame->document();
5082 if (!doc.isNull()) { 5083 if (!doc.isNull()) {
5083 WebElement element = doc.focusedElement(); 5084 WebElement element = doc.focusedElement();
5084 if (!element.isNull()) 5085 if (!element.isNull())
5085 element.simulateClick(); 5086 element.simulateClick();
5086 } 5087 }
5087 } 5088 }
5088 } 5089 }
5089 } 5090 }
5090 5091
5092 void RenderFrameImpl::OnEnableViewSourceMode() {
5093 if (!frame_)
5094 return;
5095 DCHECK(!frame_->parent());
5096 frame_->enableViewSourceMode(true);
5097 }
5098
5091 #if defined(OS_ANDROID) 5099 #if defined(OS_ANDROID)
5092 void RenderFrameImpl::OnActivateNearestFindResult(int request_id, 5100 void RenderFrameImpl::OnActivateNearestFindResult(int request_id,
5093 float x, 5101 float x,
5094 float y) { 5102 float y) {
5095 WebRect selection_rect; 5103 WebRect selection_rect;
5096 int ordinal = 5104 int ordinal =
5097 frame_->selectNearestFindMatch(WebFloatPoint(x, y), &selection_rect); 5105 frame_->selectNearestFindMatch(WebFloatPoint(x, y), &selection_rect);
5098 if (ordinal == -1) { 5106 if (ordinal == -1) {
5099 // Something went wrong, so send a no-op reply (force the frame to report 5107 // Something went wrong, so send a no-op reply (force the frame to report
5100 // the current match count) in case the host is waiting for a response due 5108 // the current match count) in case the host is waiting for a response due
(...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after
6001 int match_count, 6009 int match_count,
6002 int ordinal, 6010 int ordinal,
6003 const WebRect& selection_rect, 6011 const WebRect& selection_rect,
6004 bool final_status_update) { 6012 bool final_status_update) {
6005 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, 6013 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count,
6006 selection_rect, ordinal, 6014 selection_rect, ordinal,
6007 final_status_update)); 6015 final_status_update));
6008 } 6016 }
6009 6017
6010 } // namespace content 6018 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698