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

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: Rebase. 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 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 // and will also expect a notification when the fling ends. Since 664 // and will also expect a notification when the fling ends. Since
665 // CrOS just uses the GestureFlingStart with zero-velocity as a means 665 // CrOS just uses the GestureFlingStart with zero-velocity as a means
666 // of indicating that touchpad scroll has ended, we don't actually want 666 // of indicating that touchpad scroll has ended, we don't actually want
667 // a fling animation. 667 // a fling animation.
668 // Note: this event handling is modeled on similar code in 668 // Note: this event handling is modeled on similar code in
669 // TenderWidgetHostViewAura::FilterInputEvent(). 669 // TenderWidgetHostViewAura::FilterInputEvent().
670 return INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS; 670 return INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS;
671 } 671 }
672 } 672 }
673 673
674 // TODO(mcnee): Allow the root RWHV to consume the child's
675 // GestureScrollUpdates. This is needed to prevent the child from consuming
676 // them after the root has started an overscroll.
677 // See crbug.com/713368
678
674 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; 679 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED;
675 } 680 }
676 681
682 InputEventAckState RenderWidgetHostViewChildFrame::FilterChildGestureEvent(
683 const blink::WebGestureEvent& gesture_event) {
684 // We may be the owner of a RenderWidgetHostViewGuest,
685 // so we talk to the root RWHV on its behalf.
686 // TODO(mcnee): Remove once MimeHandlerViewGuest is based on OOPIF.
687 // See crbug.com/659750
688 if (frame_connector_)
689 return frame_connector_->GetRootRenderWidgetHostView()
690 ->FilterChildGestureEvent(gesture_event);
691 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED;
692 }
693
677 void RenderWidgetHostViewChildFrame::OnSetNeedsFlushInput() { 694 void RenderWidgetHostViewChildFrame::OnSetNeedsFlushInput() {
678 NOTIMPLEMENTED(); 695 NOTIMPLEMENTED();
679 } 696 }
680 697
681 BrowserAccessibilityManager* 698 BrowserAccessibilityManager*
682 RenderWidgetHostViewChildFrame::CreateBrowserAccessibilityManager( 699 RenderWidgetHostViewChildFrame::CreateBrowserAccessibilityManager(
683 BrowserAccessibilityDelegate* delegate, bool for_root_frame) { 700 BrowserAccessibilityDelegate* delegate, bool for_root_frame) {
684 return BrowserAccessibilityManager::Create( 701 return BrowserAccessibilityManager::Create(
685 BrowserAccessibilityManager::GetEmptyDocument(), delegate); 702 BrowserAccessibilityManager::GetEmptyDocument(), delegate);
686 } 703 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 frame_sink_id_); 741 frame_sink_id_);
725 } 742 }
726 support_.reset(); 743 support_.reset();
727 } 744 }
728 745
729 bool RenderWidgetHostViewChildFrame::HasEmbedderChanged() { 746 bool RenderWidgetHostViewChildFrame::HasEmbedderChanged() {
730 return false; 747 return false;
731 } 748 }
732 749
733 } // namespace content 750 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698