| 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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 virtual void ProcessGestureEvent(const blink::WebGestureEvent& event, | 250 virtual void ProcessGestureEvent(const blink::WebGestureEvent& event, |
| 251 const ui::LatencyInfo& latency) {} | 251 const ui::LatencyInfo& latency) {} |
| 252 | 252 |
| 253 // Transform a point that is in the coordinate space of a Surface that is | 253 // Transform a point that is in the coordinate space of a Surface that is |
| 254 // embedded within the RenderWidgetHostViewBase's Surface to the | 254 // embedded within the RenderWidgetHostViewBase's Surface to the |
| 255 // coordinate space of an embedding, or embedded, Surface. Typically this | 255 // coordinate space of an embedding, or embedded, Surface. Typically this |
| 256 // means that a point was received from an out-of-process iframe's | 256 // means that a point was received from an out-of-process iframe's |
| 257 // RenderWidget and needs to be translated to viewport coordinates for the | 257 // RenderWidget and needs to be translated to viewport coordinates for the |
| 258 // root RWHV, in which case this method is called on the root RWHV with the | 258 // root RWHV, in which case this method is called on the root RWHV with the |
| 259 // out-of-process iframe's SurfaceId. | 259 // out-of-process iframe's SurfaceId. |
| 260 // This does not transform points between surfaces where one does not | 260 // Returns false when this attempts to transform a point between coordinate |
| 261 // contain the other. To transform between sibling surfaces, the point must | 261 // spaces of surfaces where one does not contain the other. To transform |
| 262 // be transformed to the root's coordinate space as an intermediate step. | 262 // between sibling surfaces, the point must be transformed to the root's |
| 263 virtual gfx::Point TransformPointToLocalCoordSpace( | 263 // coordinate space as an intermediate step. |
| 264 virtual bool TransformPointToLocalCoordSpace( |
| 264 const gfx::Point& point, | 265 const gfx::Point& point, |
| 265 const cc::SurfaceId& original_surface); | 266 const cc::SurfaceId& original_surface, |
| 267 gfx::Point* transformed_point); |
| 266 | 268 |
| 267 // Transform a point that is in the coordinate space for the current | 269 // Transform a point that is in the coordinate space for the current |
| 268 // RenderWidgetHostView to the coordinate space of the target_view. | 270 // RenderWidgetHostView to the coordinate space of the target_view. |
| 269 virtual gfx::Point TransformPointToCoordSpaceForView( | 271 virtual bool TransformPointToCoordSpaceForView( |
| 270 const gfx::Point& point, | 272 const gfx::Point& point, |
| 271 RenderWidgetHostViewBase* target_view); | 273 RenderWidgetHostViewBase* target_view, |
| 274 gfx::Point* transformed_point); |
| 272 | 275 |
| 273 // TODO(kenrb, wjmaclean): This is a temporary subclass identifier for | 276 // TODO(kenrb, wjmaclean): This is a temporary subclass identifier for |
| 274 // RenderWidgetHostViewGuests that is needed for special treatment during | 277 // RenderWidgetHostViewGuests that is needed for special treatment during |
| 275 // input event routing. It can be removed either when RWHVGuests properly | 278 // input event routing. It can be removed either when RWHVGuests properly |
| 276 // support direct mouse event routing, or when RWHVGuest is removed | 279 // support direct mouse event routing, or when RWHVGuest is removed |
| 277 // entirely, which comes first. | 280 // entirely, which comes first. |
| 278 virtual bool IsRenderWidgetHostViewGuest(); | 281 virtual bool IsRenderWidgetHostViewGuest(); |
| 279 | 282 |
| 280 // Subclass identifier for RenderWidgetHostViewChildFrames. This is useful | 283 // Subclass identifier for RenderWidgetHostViewChildFrames. This is useful |
| 281 // to be able to know if this RWHV is embedded within another RWHV. If | 284 // to be able to know if this RWHV is embedded within another RWHV. If |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_; | 499 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_; |
| 497 | 500 |
| 498 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; | 501 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; |
| 499 | 502 |
| 500 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); | 503 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); |
| 501 }; | 504 }; |
| 502 | 505 |
| 503 } // namespace content | 506 } // namespace content |
| 504 | 507 |
| 505 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ | 508 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ |
| OLD | NEW |