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

Side by Side Diff: content/browser/frame_host/render_widget_host_view_child_frame.cc

Issue 2815823003: Notify OverscrollController of gesture events in plugins. (Closed)
Patch Set: Fix for Mac history swiper. Created 3 years, 7 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 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/browser/frame_host/render_widget_host_view_child_frame.h" 5 #include "content/browser/frame_host/render_widget_host_view_child_frame.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 // and will also expect a notification when the fling ends. Since 659 // and will also expect a notification when the fling ends. Since
660 // CrOS just uses the GestureFlingStart with zero-velocity as a means 660 // CrOS just uses the GestureFlingStart with zero-velocity as a means
661 // of indicating that touchpad scroll has ended, we don't actually want 661 // of indicating that touchpad scroll has ended, we don't actually want
662 // a fling animation. 662 // a fling animation.
663 // Note: this event handling is modeled on similar code in 663 // Note: this event handling is modeled on similar code in
664 // TenderWidgetHostViewAura::FilterInputEvent(). 664 // TenderWidgetHostViewAura::FilterInputEvent().
665 return INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS; 665 return INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS;
666 } 666 }
667 } 667 }
668 668
669 // TODO(mcnee): Allow the root RWHV to consume the child's
670 // GestureScrollUpdates. This is needed to prevent the child from consuming
671 // them after the root has started an overscroll.
Charlie Reis 2017/05/05 23:45:44 Is there a bug associated with this that you can l
Kevin McNee 2017/05/17 22:39:33 Done.
672
669 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; 673 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED;
670 } 674 }
671 675
676 InputEventAckState RenderWidgetHostViewChildFrame::FilterChildGestureEvent(
677 const blink::WebGestureEvent& gesture_event) {
678 // We may be the owner of a RenderWidgetHostViewGuest,
679 // so we talk to the root RWHV on its behalf.
680 // TODO(mcnee): Remove once MimeHandlerViewGuest is based on OOPIF.
681 // See crbug.com/659750
682 if (frame_connector_)
683 return frame_connector_->GetRootRenderWidgetHostView()
684 ->FilterChildGestureEvent(gesture_event);
685 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED;
686 }
687
672 BrowserAccessibilityManager* 688 BrowserAccessibilityManager*
673 RenderWidgetHostViewChildFrame::CreateBrowserAccessibilityManager( 689 RenderWidgetHostViewChildFrame::CreateBrowserAccessibilityManager(
674 BrowserAccessibilityDelegate* delegate, bool for_root_frame) { 690 BrowserAccessibilityDelegate* delegate, bool for_root_frame) {
675 return BrowserAccessibilityManager::Create( 691 return BrowserAccessibilityManager::Create(
676 BrowserAccessibilityManager::GetEmptyDocument(), delegate); 692 BrowserAccessibilityManager::GetEmptyDocument(), delegate);
677 } 693 }
678 694
679 void RenderWidgetHostViewChildFrame::ClearCompositorSurfaceIfNecessary() { 695 void RenderWidgetHostViewChildFrame::ClearCompositorSurfaceIfNecessary() {
680 if (!support_) 696 if (!support_)
681 return; 697 return;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 frame_sink_id_); 731 frame_sink_id_);
716 } 732 }
717 support_.reset(); 733 support_.reset();
718 } 734 }
719 735
720 bool RenderWidgetHostViewChildFrame::HasEmbedderChanged() { 736 bool RenderWidgetHostViewChildFrame::HasEmbedderChanged() {
721 return false; 737 return false;
722 } 738 }
723 739
724 } // namespace content 740 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698