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

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

Issue 2553783003: Don't consume user gesture in RenderFrameProxy::navigate. (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « chrome/browser/chrome_site_per_process_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_proxy.h" 5 #include "content/renderer/render_frame_proxy.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 params.url = request.url(); 453 params.url = request.url();
454 params.uses_post = request.httpMethod().utf8() == "POST"; 454 params.uses_post = request.httpMethod().utf8() == "POST";
455 params.resource_request_body = GetRequestBodyForWebURLRequest(request); 455 params.resource_request_body = GetRequestBodyForWebURLRequest(request);
456 params.extra_headers = GetWebURLRequestHeaders(request); 456 params.extra_headers = GetWebURLRequestHeaders(request);
457 params.referrer = Referrer( 457 params.referrer = Referrer(
458 blink::WebStringToGURL( 458 blink::WebStringToGURL(
459 request.httpHeaderField(blink::WebString::fromUTF8("Referer"))), 459 request.httpHeaderField(blink::WebString::fromUTF8("Referer"))),
460 request.referrerPolicy()); 460 request.referrerPolicy());
461 params.disposition = WindowOpenDisposition::CURRENT_TAB; 461 params.disposition = WindowOpenDisposition::CURRENT_TAB;
462 params.should_replace_current_entry = should_replace_current_entry; 462 params.should_replace_current_entry = should_replace_current_entry;
463 params.user_gesture = 463 params.user_gesture = request.hasUserGesture();
alexmos 2016/12/06 01:58:05 We already set this on the request in RemoteFrame:
464 blink::WebUserGestureIndicator::isProcessingUserGesture();
465 blink::WebUserGestureIndicator::consumeUserGesture();
466 Send(new FrameHostMsg_OpenURL(routing_id_, params)); 464 Send(new FrameHostMsg_OpenURL(routing_id_, params));
467 } 465 }
468 466
469 void RenderFrameProxy::forwardInputEvent(const blink::WebInputEvent* event) { 467 void RenderFrameProxy::forwardInputEvent(const blink::WebInputEvent* event) {
470 Send(new FrameHostMsg_ForwardInputEvent(routing_id_, event)); 468 Send(new FrameHostMsg_ForwardInputEvent(routing_id_, event));
471 } 469 }
472 470
473 void RenderFrameProxy::frameRectsChanged(const blink::WebRect& frame_rect) { 471 void RenderFrameProxy::frameRectsChanged(const blink::WebRect& frame_rect) {
474 gfx::Rect rect = frame_rect; 472 gfx::Rect rect = frame_rect;
475 if (IsUseZoomForDSFEnabled()) { 473 if (IsUseZoomForDSFEnabled()) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 blink::WebLocalFrame* source) { 505 blink::WebLocalFrame* source) {
508 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); 506 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID();
509 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); 507 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id));
510 } 508 }
511 509
512 void RenderFrameProxy::frameFocused() { 510 void RenderFrameProxy::frameFocused() {
513 Send(new FrameHostMsg_FrameFocused(routing_id_)); 511 Send(new FrameHostMsg_FrameFocused(routing_id_));
514 } 512 }
515 513
516 } // namespace 514 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/chrome_site_per_process_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698