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

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

Issue 2184033003: Refactor browser process coordinate transformation methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nasko comments addressed Created 4 years, 4 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_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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 const ui::LatencyInfo& latency) {} 234 const ui::LatencyInfo& latency) {}
235 virtual void ProcessMouseWheelEvent(const blink::WebMouseWheelEvent& event, 235 virtual void ProcessMouseWheelEvent(const blink::WebMouseWheelEvent& event,
236 const ui::LatencyInfo& latency) {} 236 const ui::LatencyInfo& latency) {}
237 virtual void ProcessTouchEvent(const blink::WebTouchEvent& event, 237 virtual void ProcessTouchEvent(const blink::WebTouchEvent& event,
238 const ui::LatencyInfo& latency) {} 238 const ui::LatencyInfo& latency) {}
239 virtual void ProcessGestureEvent(const blink::WebGestureEvent& event, 239 virtual void ProcessGestureEvent(const blink::WebGestureEvent& event,
240 const ui::LatencyInfo& latency) {} 240 const ui::LatencyInfo& latency) {}
241 241
242 // Transform a point that is in the coordinate space of a Surface that is 242 // Transform a point that is in the coordinate space of a Surface that is
243 // embedded within the RenderWidgetHostViewBase's Surface to the 243 // embedded within the RenderWidgetHostViewBase's Surface to the
244 // coordinate space of the embedding Surface. Typically this means that a 244 // coordinate space of an embedding, or embedded, Surface. Typically this
lfg 2016/07/28 19:58:58 Is this comment change correct here? I can see tha
kenrb 2016/07/28 21:19:08 Since RenderWidgetHostViewChildFrame uses CrossPro
lfg 2016/07/28 21:30:27 Acknowledged.
245 // point was received from an out-of-process iframe's RenderWidget and needs 245 // means that a point was received from an out-of-process iframe's
246 // to be translated to viewport coordinates for the root RWHV, in which case 246 // RenderWidget and needs to be translated to viewport coordinates for the
247 // this method is called on the root RWHV with the out-of-process iframe's 247 // root RWHV, in which case this method is called on the root RWHV with the
248 // SurfaceId. 248 // out-of-process iframe's SurfaceId.
249 virtual void TransformPointToLocalCoordSpace( 249 // This does not transform points between surfaces where one does not
250 // contain the other. To transform between sibling surfaces, the point must
251 // be transformed to the root's coordinate space as an intermediate step.
252 virtual gfx::Point TransformPointToLocalCoordSpace(
250 const gfx::Point& point, 253 const gfx::Point& point,
251 const cc::SurfaceId& original_surface, 254 const cc::SurfaceId& original_surface);
252 gfx::Point* transformed_point); 255
256 // Transform a point that is in the coordinate space for the current
257 // RenderWidgetHostView to the coordinate space of the target_view.
258 virtual gfx::Point TransformPointToCoordSpaceForView(
259 const gfx::Point& point,
260 RenderWidgetHostViewBase* target_view);
253 261
254 //---------------------------------------------------------------------------- 262 //----------------------------------------------------------------------------
255 // The following methods are related to IME. 263 // The following methods are related to IME.
256 // TODO(ekaramad): Most of the IME methods should not stay virtual after IME 264 // TODO(ekaramad): Most of the IME methods should not stay virtual after IME
257 // is implemented for OOPIF. After fixing IME, mark the corresponding methods 265 // is implemented for OOPIF. After fixing IME, mark the corresponding methods
258 // non-virtual (https://crbug.com/578168). 266 // non-virtual (https://crbug.com/578168).
259 267
260 // Updates the state of the input method attached to the view. 268 // Updates the state of the input method attached to the view.
261 virtual void TextInputStateChanged(const TextInputState& text_input_state); 269 virtual void TextInputStateChanged(const TextInputState& text_input_state);
262 270
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_; 478 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_;
471 479
472 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; 480 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_;
473 481
474 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); 482 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase);
475 }; 483 };
476 484
477 } // namespace content 485 } // namespace content
478 486
479 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ 487 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698