Chromium Code Reviews| 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 134 // the list of registered views, i.e., TextInputManager is no longer tracking | 134 // the list of registered views, i.e., TextInputManager is no longer tracking |
| 135 // TextInputState from this view. The RWHV should reset |text_input_manager_| | 135 // TextInputState from this view. The RWHV should reset |text_input_manager_| |
| 136 // to nullptr. | 136 // to nullptr. |
| 137 void DidUnregisterFromTextInputManager(TextInputManager* text_input_manager); | 137 void DidUnregisterFromTextInputManager(TextInputManager* text_input_manager); |
| 138 | 138 |
| 139 base::WeakPtr<RenderWidgetHostViewBase> GetWeakPtr(); | 139 base::WeakPtr<RenderWidgetHostViewBase> GetWeakPtr(); |
| 140 | 140 |
| 141 //---------------------------------------------------------------------------- | 141 //---------------------------------------------------------------------------- |
| 142 // The following methods can be overridden by derived classes. | 142 // The following methods can be overridden by derived classes. |
| 143 | 143 |
| 144 // Notifies the View that the renderer selection bounds has changed. | |
| 145 // |start_rect| and |end_rect| are the bounds end of the selection in the | |
| 146 // coordinate system of the render view. |start_direction| and |end_direction| | |
|
kenrb
2016/06/28 19:15:23
nit: "render view" here is now more correctly "ren
EhsanK
2016/06/29 17:09:58
Acknowledged.
| |
| 147 // indicates the direction at which the selection was made on touch devices. | |
| 148 virtual void SelectionBoundsChanged( | |
| 149 const ViewHostMsg_SelectionBounds_Params& params); | |
| 150 | |
| 144 // Notifies the View that the renderer text selection has changed. | 151 // Notifies the View that the renderer text selection has changed. |
| 145 virtual void SelectionChanged(const base::string16& text, | 152 virtual void SelectionChanged(const base::string16& text, |
| 146 size_t offset, | 153 size_t offset, |
| 147 const gfx::Range& range); | 154 const gfx::Range& range); |
| 148 | 155 |
| 149 // The requested size of the renderer. May differ from GetViewBounds().size() | 156 // The requested size of the renderer. May differ from GetViewBounds().size() |
| 150 // when the view requires additional throttling. | 157 // when the view requires additional throttling. |
| 151 virtual gfx::Size GetRequestedRendererSize() const; | 158 virtual gfx::Size GetRequestedRendererSize() const; |
| 152 | 159 |
| 153 // The size of the view's backing surface in non-DPI-adjusted pixels. | 160 // The size of the view's backing surface in non-DPI-adjusted pixels. |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 289 virtual void RenderProcessGone(base::TerminationStatus status, | 296 virtual void RenderProcessGone(base::TerminationStatus status, |
| 290 int error_code) = 0; | 297 int error_code) = 0; |
| 291 | 298 |
| 292 // Tells the View to destroy itself. | 299 // Tells the View to destroy itself. |
| 293 virtual void Destroy() = 0; | 300 virtual void Destroy() = 0; |
| 294 | 301 |
| 295 // Tells the View that the tooltip text for the current mouse position over | 302 // Tells the View that the tooltip text for the current mouse position over |
| 296 // the page has changed. | 303 // the page has changed. |
| 297 virtual void SetTooltipText(const base::string16& tooltip_text) = 0; | 304 virtual void SetTooltipText(const base::string16& tooltip_text) = 0; |
| 298 | 305 |
| 299 // Notifies the View that the renderer selection bounds has changed. | |
| 300 // |start_rect| and |end_rect| are the bounds end of the selection in the | |
| 301 // coordinate system of the render view. |start_direction| and |end_direction| | |
| 302 // indicates the direction at which the selection was made on touch devices. | |
| 303 virtual void SelectionBoundsChanged( | |
| 304 const ViewHostMsg_SelectionBounds_Params& params) = 0; | |
| 305 | |
| 306 // Copies the contents of the compositing surface, providing a new SkBitmap | 306 // Copies the contents of the compositing surface, providing a new SkBitmap |
| 307 // result via an asynchronously-run |callback|. |src_subrect| is specified in | 307 // result via an asynchronously-run |callback|. |src_subrect| is specified in |
| 308 // layer space coordinates for the current platform (e.g., DIP for Aura/Mac, | 308 // layer space coordinates for the current platform (e.g., DIP for Aura/Mac, |
| 309 // physical for Android), and is the region to be copied from this view. When | 309 // physical for Android), and is the region to be copied from this view. When |
| 310 // |src_subrect| is empty then the whole surface will be copied. The copy is | 310 // |src_subrect| is empty then the whole surface will be copied. The copy is |
| 311 // then scaled to a SkBitmap of size |dst_size|. If |dst_size| is empty then | 311 // then scaled to a SkBitmap of size |dst_size|. If |dst_size| is empty then |
| 312 // output will be unscaled. |callback| is run with true on success, | 312 // output will be unscaled. |callback| is run with true on success, |
| 313 // false otherwise. A smaller region than |src_subrect| may be copied | 313 // false otherwise. A smaller region than |src_subrect| may be copied |
| 314 // if the underlying surface is smaller than |src_subrect|. | 314 // if the underlying surface is smaller than |src_subrect|. |
| 315 virtual void CopyFromCompositingSurface( | 315 virtual void CopyFromCompositingSurface( |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 465 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_; | 465 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_; |
| 466 | 466 |
| 467 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; | 467 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; |
| 468 | 468 |
| 469 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); | 469 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); |
| 470 }; | 470 }; |
| 471 | 471 |
| 472 } // namespace content | 472 } // namespace content |
| 473 | 473 |
| 474 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ | 474 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ |
| OLD | NEW |