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

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

Issue 2553783003: Don't consume user gesture in RenderFrameProxy::navigate. (Closed)
Patch Set: Rebase 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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 params.url = request.url(); 468 params.url = request.url();
469 params.uses_post = request.httpMethod().utf8() == "POST"; 469 params.uses_post = request.httpMethod().utf8() == "POST";
470 params.resource_request_body = GetRequestBodyForWebURLRequest(request); 470 params.resource_request_body = GetRequestBodyForWebURLRequest(request);
471 params.extra_headers = GetWebURLRequestHeaders(request); 471 params.extra_headers = GetWebURLRequestHeaders(request);
472 params.referrer = Referrer( 472 params.referrer = Referrer(
473 blink::WebStringToGURL( 473 blink::WebStringToGURL(
474 request.httpHeaderField(blink::WebString::fromUTF8("Referer"))), 474 request.httpHeaderField(blink::WebString::fromUTF8("Referer"))),
475 request.getReferrerPolicy()); 475 request.getReferrerPolicy());
476 params.disposition = WindowOpenDisposition::CURRENT_TAB; 476 params.disposition = WindowOpenDisposition::CURRENT_TAB;
477 params.should_replace_current_entry = should_replace_current_entry; 477 params.should_replace_current_entry = should_replace_current_entry;
478 params.user_gesture = 478 params.user_gesture = request.hasUserGesture();
479 blink::WebUserGestureIndicator::isProcessingUserGesture();
480 blink::WebUserGestureIndicator::consumeUserGesture();
481 Send(new FrameHostMsg_OpenURL(routing_id_, params)); 479 Send(new FrameHostMsg_OpenURL(routing_id_, params));
482 } 480 }
483 481
484 void RenderFrameProxy::forwardInputEvent(const blink::WebInputEvent* event) { 482 void RenderFrameProxy::forwardInputEvent(const blink::WebInputEvent* event) {
485 Send(new FrameHostMsg_ForwardInputEvent(routing_id_, event)); 483 Send(new FrameHostMsg_ForwardInputEvent(routing_id_, event));
486 } 484 }
487 485
488 void RenderFrameProxy::frameRectsChanged(const blink::WebRect& frame_rect) { 486 void RenderFrameProxy::frameRectsChanged(const blink::WebRect& frame_rect) {
489 gfx::Rect rect = frame_rect; 487 gfx::Rect rect = frame_rect;
490 if (IsUseZoomForDSFEnabled()) { 488 if (IsUseZoomForDSFEnabled()) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 blink::WebLocalFrame* source) { 520 blink::WebLocalFrame* source) {
523 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); 521 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID();
524 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); 522 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id));
525 } 523 }
526 524
527 void RenderFrameProxy::frameFocused() { 525 void RenderFrameProxy::frameFocused() {
528 Send(new FrameHostMsg_FrameFocused(routing_id_)); 526 Send(new FrameHostMsg_FrameFocused(routing_id_));
529 } 527 }
530 528
531 } // namespace 529 } // 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