| 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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 // with the other non-virtual methods after TextInputState tracking is fixed | 256 // with the other non-virtual methods after TextInputState tracking is fixed |
| 257 // on all platforms (https://crbug.com/578168). | 257 // on all platforms (https://crbug.com/578168). |
| 258 virtual void TextInputStateChanged(const TextInputState& text_input_state); | 258 virtual void TextInputStateChanged(const TextInputState& text_input_state); |
| 259 | 259 |
| 260 // Cancel the ongoing composition of the input method attached to the view. | 260 // 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 | 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. | 262 // with the other non-virtual methods after IME is fixed on all platforms. |
| 263 // (https://crbug.com/578168). | 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. |
| 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 // TODO(ekaramad): This method will not stay virtual. It will be moved up top |
| 273 // with the other non-virtual methods after IME is fixed on all platforms. |
| 274 // (https://crbug.com/578168). |
| 275 virtual void SelectionBoundsChanged( |
| 276 const ViewHostMsg_SelectionBounds_Params& params); |
| 277 |
| 266 //---------------------------------------------------------------------------- | 278 //---------------------------------------------------------------------------- |
| 267 // The following static methods are implemented by each platform. | 279 // The following static methods are implemented by each platform. |
| 268 | 280 |
| 269 static void GetDefaultScreenInfo(blink::WebScreenInfo* results); | 281 static void GetDefaultScreenInfo(blink::WebScreenInfo* results); |
| 270 | 282 |
| 271 //---------------------------------------------------------------------------- | 283 //---------------------------------------------------------------------------- |
| 272 // The following pure virtual methods are implemented by derived classes. | 284 // The following pure virtual methods are implemented by derived classes. |
| 273 | 285 |
| 274 // Perform all the initialization steps necessary for this object to represent | 286 // 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|. | 287 // a popup (such as a <select> dropdown), then shows the popup at |pos|. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 292 virtual void RenderProcessGone(base::TerminationStatus status, | 304 virtual void RenderProcessGone(base::TerminationStatus status, |
| 293 int error_code) = 0; | 305 int error_code) = 0; |
| 294 | 306 |
| 295 // Tells the View to destroy itself. | 307 // Tells the View to destroy itself. |
| 296 virtual void Destroy() = 0; | 308 virtual void Destroy() = 0; |
| 297 | 309 |
| 298 // Tells the View that the tooltip text for the current mouse position over | 310 // Tells the View that the tooltip text for the current mouse position over |
| 299 // the page has changed. | 311 // the page has changed. |
| 300 virtual void SetTooltipText(const base::string16& tooltip_text) = 0; | 312 virtual void SetTooltipText(const base::string16& tooltip_text) = 0; |
| 301 | 313 |
| 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 | 314 // Copies the contents of the compositing surface, providing a new SkBitmap |
| 310 // result via an asynchronously-run |callback|. |src_subrect| is specified in | 315 // 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, | 316 // 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 | 317 // 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 | 318 // |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 | 319 // 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, | 320 // output will be unscaled. |callback| is run with true on success, |
| 316 // false otherwise. A smaller region than |src_subrect| may be copied | 321 // false otherwise. A smaller region than |src_subrect| may be copied |
| 317 // if the underlying surface is smaller than |src_subrect|. | 322 // if the underlying surface is smaller than |src_subrect|. |
| 318 virtual void CopyFromCompositingSurface( | 323 virtual void CopyFromCompositingSurface( |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_; | 473 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_; |
| 469 | 474 |
| 470 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; | 475 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; |
| 471 | 476 |
| 472 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); | 477 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); |
| 473 }; | 478 }; |
| 474 | 479 |
| 475 } // namespace content | 480 } // namespace content |
| 476 | 481 |
| 477 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ | 482 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ |
| OLD | NEW |