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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.h

Issue 291003002: Move OverscrollController to RenderWidgetHostViewAura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DCHECK_GE Created 6 years, 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 #if defined(OS_ANDROID) 75 #if defined(OS_ANDROID)
76 namespace blink { 76 namespace blink {
77 class WebLayer; 77 class WebLayer;
78 } 78 }
79 #endif 79 #endif
80 80
81 namespace content { 81 namespace content {
82 class InputRouter; 82 class InputRouter;
83 class MockRenderWidgetHost; 83 class MockRenderWidgetHost;
84 class OverscrollController;
85 class RenderWidgetHostDelegate; 84 class RenderWidgetHostDelegate;
86 class RenderWidgetHostViewBase; 85 class RenderWidgetHostViewBase;
87 class SyntheticGestureController; 86 class SyntheticGestureController;
88 class TimeoutMonitor; 87 class TimeoutMonitor;
89 class TouchEmulator; 88 class TouchEmulator;
90 class WebCursor; 89 class WebCursor;
91 struct EditCommand; 90 struct EditCommand;
92 91
93 // This implements the RenderWidgetHost interface that is exposed to 92 // This implements the RenderWidgetHost interface that is exposed to
94 // embedders of content, and adds things only visible to content. 93 // embedders of content, and adds things only visible to content.
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 // We need to reset these flags when we want to repaint the contents of 464 // We need to reset these flags when we want to repaint the contents of
466 // browser plugin in this RWH. Resetting these flags will ensure we ignore 465 // browser plugin in this RWH. Resetting these flags will ensure we ignore
467 // any previous pending acks that are not relevant upon repaint. 466 // any previous pending acks that are not relevant upon repaint.
468 void ResetSizeAndRepaintPendingFlags(); 467 void ResetSizeAndRepaintPendingFlags();
469 468
470 void DetachDelegate(); 469 void DetachDelegate();
471 470
472 // Update the renderer's cache of the screen rect of the view and window. 471 // Update the renderer's cache of the screen rect of the view and window.
473 void SendScreenRects(); 472 void SendScreenRects();
474 473
475 OverscrollController* overscroll_controller() const {
476 return overscroll_controller_.get();
477 }
478
479 // Sets whether the overscroll controller should be enabled for this page.
480 void SetOverscrollControllerEnabled(bool enabled);
481
482 // Suppreses future char events until a keydown. See 474 // Suppreses future char events until a keydown. See
483 // suppress_next_char_events_. 475 // suppress_next_char_events_.
484 void SuppressNextCharEvents(); 476 void SuppressNextCharEvents();
485 477
486 // Called by RenderWidgetHostView in response to OnSetNeedsFlushInput. 478 // Called by RenderWidgetHostView in response to OnSetNeedsFlushInput.
487 void FlushInput(); 479 void FlushInput();
488 480
489 // InputRouterClient 481 // InputRouterClient
490 virtual void SetNeedsFlush() OVERRIDE; 482 virtual void SetNeedsFlush() OVERRIDE;
491 483
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 571
580 // Indicates if the render widget host should track the render widget's size 572 // Indicates if the render widget host should track the render widget's size
581 // as opposed to visa versa. 573 // as opposed to visa versa.
582 void SetShouldAutoResize(bool enable); 574 void SetShouldAutoResize(bool enable);
583 575
584 // Expose increment/decrement of the in-flight event count, so 576 // Expose increment/decrement of the in-flight event count, so
585 // RenderViewHostImpl can account for in-flight beforeunload/unload events. 577 // RenderViewHostImpl can account for in-flight beforeunload/unload events.
586 int increment_in_flight_event_count() { return ++in_flight_event_count_; } 578 int increment_in_flight_event_count() { return ++in_flight_event_count_; }
587 int decrement_in_flight_event_count() { return --in_flight_event_count_; } 579 int decrement_in_flight_event_count() { return --in_flight_event_count_; }
588 580
589 // Returns whether an overscroll gesture is in progress.
590 bool IsInOverscrollGesture() const;
591
592 // The View associated with the RenderViewHost. The lifetime of this object 581 // The View associated with the RenderViewHost. The lifetime of this object
593 // is associated with the lifetime of the Render process. If the Renderer 582 // is associated with the lifetime of the Render process. If the Renderer
594 // crashes, its View is destroyed and this pointer becomes NULL, even though 583 // crashes, its View is destroyed and this pointer becomes NULL, even though
595 // render_view_host_ lives on to load another URL (creating a new View while 584 // render_view_host_ lives on to load another URL (creating a new View while
596 // doing so). 585 // doing so).
597 RenderWidgetHostViewBase* view_; 586 RenderWidgetHostViewBase* view_;
598 587
599 // true if a renderer has once been valid. We use this flag to display a sad 588 // true if a renderer has once been valid. We use this flag to display a sad
600 // tab only when we lose our renderer and not if a paint occurs during 589 // tab only when we lose our renderer and not if a paint occurs during
601 // initialization. 590 // initialization.
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 // widgets that don't have focus to still handle key presses. 666 // widgets that don't have focus to still handle key presses.
678 bool KeyPressListenersHandleEvent(const NativeWebKeyboardEvent& event); 667 bool KeyPressListenersHandleEvent(const NativeWebKeyboardEvent& event);
679 668
680 // InputRouterClient 669 // InputRouterClient
681 virtual InputEventAckState FilterInputEvent( 670 virtual InputEventAckState FilterInputEvent(
682 const blink::WebInputEvent& event, 671 const blink::WebInputEvent& event,
683 const ui::LatencyInfo& latency_info) OVERRIDE; 672 const ui::LatencyInfo& latency_info) OVERRIDE;
684 virtual void IncrementInFlightEventCount() OVERRIDE; 673 virtual void IncrementInFlightEventCount() OVERRIDE;
685 virtual void DecrementInFlightEventCount() OVERRIDE; 674 virtual void DecrementInFlightEventCount() OVERRIDE;
686 virtual void OnHasTouchEventHandlers(bool has_handlers) OVERRIDE; 675 virtual void OnHasTouchEventHandlers(bool has_handlers) OVERRIDE;
687 virtual OverscrollController* GetOverscrollController() const OVERRIDE;
688 virtual void DidFlush() OVERRIDE; 676 virtual void DidFlush() OVERRIDE;
689 virtual void DidOverscroll(const DidOverscrollParams& params) OVERRIDE; 677 virtual void DidOverscroll(const DidOverscrollParams& params) OVERRIDE;
690 678
691 // InputAckHandler 679 // InputAckHandler
692 virtual void OnKeyboardEventAck(const NativeWebKeyboardEvent& event, 680 virtual void OnKeyboardEventAck(const NativeWebKeyboardEvent& event,
693 InputEventAckState ack_result) OVERRIDE; 681 InputEventAckState ack_result) OVERRIDE;
694 virtual void OnWheelEventAck(const MouseWheelEventWithLatencyInfo& event, 682 virtual void OnWheelEventAck(const MouseWheelEventWithLatencyInfo& event,
695 InputEventAckState ack_result) OVERRIDE; 683 InputEventAckState ack_result) OVERRIDE;
696 virtual void OnTouchEventAck(const TouchEventWithLatencyInfo& event, 684 virtual void OnTouchEventAck(const TouchEventWithLatencyInfo& event,
697 InputEventAckState ack_result) OVERRIDE; 685 InputEventAckState ack_result) OVERRIDE;
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 847
860 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; 848 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_;
861 849
862 scoped_ptr<SyntheticGestureController> synthetic_gesture_controller_; 850 scoped_ptr<SyntheticGestureController> synthetic_gesture_controller_;
863 851
864 scoped_ptr<TouchEmulator> touch_emulator_; 852 scoped_ptr<TouchEmulator> touch_emulator_;
865 853
866 // Receives and handles all input events. 854 // Receives and handles all input events.
867 scoped_ptr<InputRouter> input_router_; 855 scoped_ptr<InputRouter> input_router_;
868 856
869 scoped_ptr<OverscrollController> overscroll_controller_;
870
871 scoped_ptr<TimeoutMonitor> hang_monitor_timeout_; 857 scoped_ptr<TimeoutMonitor> hang_monitor_timeout_;
872 858
873 #if defined(OS_WIN) 859 #if defined(OS_WIN)
874 std::list<HWND> dummy_windows_for_activation_; 860 std::list<HWND> dummy_windows_for_activation_;
875 #endif 861 #endif
876 862
877 int64 last_input_number_; 863 int64 last_input_number_;
878 864
879 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 865 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
880 }; 866 };
881 867
882 } // namespace content 868 } // namespace content
883 869
884 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 870 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/overscroll_controller.cc ('k') | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698