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

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

Issue 2057803002: Tracking SelectionBounds for all RenderWidgets on the Browser Side (Aura Only) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a unit test Created 4 years, 5 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 // embedded within the RenderWidgetHostViewBase's Surface to the 244 // embedded within the RenderWidgetHostViewBase's Surface to the
245 // coordinate space of the embedding Surface. Typically this means that a 245 // coordinate space of the embedding Surface. Typically this means that a
246 // point was received from an out-of-process iframe's RenderWidget and needs 246 // point was received from an out-of-process iframe's RenderWidget and needs
247 // to be translated to viewport coordinates for the root RWHV, in which case 247 // to be translated to viewport coordinates for the root RWHV, in which case
248 // this method is called on the root RWHV with the out-of-process iframe's 248 // this method is called on the root RWHV with the out-of-process iframe's
249 // SurfaceId. 249 // SurfaceId.
250 virtual void TransformPointToLocalCoordSpace(const gfx::Point& point, 250 virtual void TransformPointToLocalCoordSpace(const gfx::Point& point,
251 cc::SurfaceId original_surface, 251 cc::SurfaceId original_surface,
252 gfx::Point* transformed_point); 252 gfx::Point* transformed_point);
253 253
254 //----------------------------------------------------------------------------
255 // The following methods are related to IME.
256 // 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
258 // non-virtual (https://crbug.com/578168).
259
254 // Updates the state of the input method attached to the view. 260 // Updates the state of the input method attached to the view.
255 // TODO(ekaramad): This method will not stay virtual. It will be moved up top
256 // with the other non-virtual methods after TextInputState tracking is fixed
257 // on all platforms (https://crbug.com/578168).
258 virtual void TextInputStateChanged(const TextInputState& text_input_state); 261 virtual void TextInputStateChanged(const TextInputState& text_input_state);
259 262
260 // Cancel the ongoing composition of the input method attached to the view. 263 // Cancel the ongoing composition of the input method attached to the view.
261 // TODO(ekaramad): This method will not stay virtual. It will be moved up top
262 // with the other non-virtual methods after IME is fixed on all platforms.
263 // (https://crbug.com/578168).
264 virtual void ImeCancelComposition(); 264 virtual void ImeCancelComposition();
265 265
266 // Notifies the View that the renderer selection bounds has changed.
Charlie Reis 2016/07/06 18:42:36 nit: view
EhsanK 2016/07/06 19:15:34 Done. I believe this is some older style as I inhe
267 // Selection bounds are described as a focus bound which is the current
268 // position of caret on the screen, as well as the anchor bound which is the
269 // starting position of the selection. The coordinates are with respect to
270 // RenderWidget's window's origin. Focus and anchor bound are represented as
271 // gfx::Rect.
272 virtual void SelectionBoundsChanged(
273 const ViewHostMsg_SelectionBounds_Params& params);
274
266 //---------------------------------------------------------------------------- 275 //----------------------------------------------------------------------------
267 // The following static methods are implemented by each platform. 276 // The following static methods are implemented by each platform.
268 277
269 static void GetDefaultScreenInfo(blink::WebScreenInfo* results); 278 static void GetDefaultScreenInfo(blink::WebScreenInfo* results);
270 279
271 //---------------------------------------------------------------------------- 280 //----------------------------------------------------------------------------
272 // The following pure virtual methods are implemented by derived classes. 281 // The following pure virtual methods are implemented by derived classes.
273 282
274 // Perform all the initialization steps necessary for this object to represent 283 // Perform all the initialization steps necessary for this object to represent
275 // a popup (such as a <select> dropdown), then shows the popup at |pos|. 284 // a popup (such as a <select> dropdown), then shows the popup at |pos|.
(...skipping 16 matching lines...) Expand all
292 virtual void RenderProcessGone(base::TerminationStatus status, 301 virtual void RenderProcessGone(base::TerminationStatus status,
293 int error_code) = 0; 302 int error_code) = 0;
294 303
295 // Tells the View to destroy itself. 304 // Tells the View to destroy itself.
296 virtual void Destroy() = 0; 305 virtual void Destroy() = 0;
297 306
298 // Tells the View that the tooltip text for the current mouse position over 307 // Tells the View that the tooltip text for the current mouse position over
299 // the page has changed. 308 // the page has changed.
300 virtual void SetTooltipText(const base::string16& tooltip_text) = 0; 309 virtual void SetTooltipText(const base::string16& tooltip_text) = 0;
301 310
302 // Notifies the View that the renderer selection bounds has changed.
303 // |start_rect| and |end_rect| are the bounds end of the selection in the
304 // coordinate system of the render view. |start_direction| and |end_direction|
305 // indicates the direction at which the selection was made on touch devices.
306 virtual void SelectionBoundsChanged(
307 const ViewHostMsg_SelectionBounds_Params& params) = 0;
308
309 // Copies the contents of the compositing surface, providing a new SkBitmap 311 // Copies the contents of the compositing surface, providing a new SkBitmap
310 // result via an asynchronously-run |callback|. |src_subrect| is specified in 312 // result via an asynchronously-run |callback|. |src_subrect| is specified in
311 // layer space coordinates for the current platform (e.g., DIP for Aura/Mac, 313 // layer space coordinates for the current platform (e.g., DIP for Aura/Mac,
312 // physical for Android), and is the region to be copied from this view. When 314 // physical for Android), and is the region to be copied from this view. When
313 // |src_subrect| is empty then the whole surface will be copied. The copy is 315 // |src_subrect| is empty then the whole surface will be copied. The copy is
314 // then scaled to a SkBitmap of size |dst_size|. If |dst_size| is empty then 316 // then scaled to a SkBitmap of size |dst_size|. If |dst_size| is empty then
315 // output will be unscaled. |callback| is run with true on success, 317 // output will be unscaled. |callback| is run with true on success,
316 // false otherwise. A smaller region than |src_subrect| may be copied 318 // false otherwise. A smaller region than |src_subrect| may be copied
317 // if the underlying surface is smaller than |src_subrect|. 319 // if the underlying surface is smaller than |src_subrect|.
318 virtual void CopyFromCompositingSurface( 320 virtual void CopyFromCompositingSurface(
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_; 470 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_;
469 471
470 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; 472 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_;
471 473
472 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); 474 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase);
473 }; 475 };
474 476
475 } // namespace content 477 } // namespace content
476 478
477 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ 479 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698