OLD | NEW |
---|---|
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_VIEW_BASE_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
101 base::string16 GetSelectedText() override; | 101 base::string16 GetSelectedText() override; |
102 bool IsMouseLocked() override; | 102 bool IsMouseLocked() override; |
103 gfx::Size GetVisibleViewportSize() const override; | 103 gfx::Size GetVisibleViewportSize() const override; |
104 void SetInsets(const gfx::Insets& insets) override; | 104 void SetInsets(const gfx::Insets& insets) override; |
105 void BeginFrameSubscription( | 105 void BeginFrameSubscription( |
106 std::unique_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) override; | 106 std::unique_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) override; |
107 void EndFrameSubscription() override; | 107 void EndFrameSubscription() override; |
108 void FocusedNodeTouched(const gfx::Point& location_dips_screen, | 108 void FocusedNodeTouched(const gfx::Point& location_dips_screen, |
109 bool editable) override; | 109 bool editable) override; |
110 | 110 |
111 // Keeps track of last position of touch points and sets MovementXY for them. | |
112 void SetMovementXYForTouchPoints(blink::WebTouchEvent* event); | |
113 | |
111 // This only needs to be overridden by RenderWidgetHostViewBase subclasses | 114 // This only needs to be overridden by RenderWidgetHostViewBase subclasses |
112 // that handle content embedded within other RenderWidgetHostViews. | 115 // that handle content embedded within other RenderWidgetHostViews. |
113 gfx::Point TransformPointToRootCoordSpace(const gfx::Point& point) override; | 116 gfx::Point TransformPointToRootCoordSpace(const gfx::Point& point) override; |
114 gfx::PointF TransformPointToRootCoordSpaceF( | 117 gfx::PointF TransformPointToRootCoordSpaceF( |
115 const gfx::PointF& point) override; | 118 const gfx::PointF& point) override; |
116 | 119 |
117 // IPC::Listener implementation: | 120 // IPC::Listener implementation: |
118 bool OnMessageReceived(const IPC::Message& msg) override; | 121 bool OnMessageReceived(const IPC::Message& msg) override; |
119 | 122 |
120 void SetPopupType(blink::WebPopupType popup_type); | 123 void SetPopupType(blink::WebPopupType popup_type); |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
475 void FlushInput(); | 478 void FlushInput(); |
476 | 479 |
477 gfx::Rect current_display_area_; | 480 gfx::Rect current_display_area_; |
478 | 481 |
479 uint32_t renderer_frame_number_; | 482 uint32_t renderer_frame_number_; |
480 | 483 |
481 base::OneShotTimer flush_input_timer_; | 484 base::OneShotTimer flush_input_timer_; |
482 | 485 |
483 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_; | 486 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_; |
484 | 487 |
488 // Last touch position relative to screen. Used to compute movementX/Y. | |
489 std::map<int, gfx::Point> global_touch_position_; | |
Rick Byers
2017/02/06 22:00:53
Is there a reason to put this here instead of in R
Navid Zolghadr
2017/02/06 22:40:41
I asked about this from jonross@. He mentioned Ren
sadrul
2017/02/07 03:48:30
Can this live in InputRouterImpl instead? Ideally,
Navid Zolghadr
2017/02/07 15:43:05
The reason I added it here is mostly because I wan
Navid Zolghadr
2017/02/08 17:18:49
Done. I haven't moved the mouse one yet. But I'll
| |
490 | |
485 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; | 491 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; |
486 | 492 |
487 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); | 493 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); |
488 }; | 494 }; |
489 | 495 |
490 } // namespace content | 496 } // namespace content |
491 | 497 |
492 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ | 498 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ |
OLD | NEW |