| 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| |
| 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 virtual void RenderProcessGone(base::TerminationStatus status, | 297 virtual void RenderProcessGone(base::TerminationStatus status, |
| 291 int error_code) = 0; | 298 int error_code) = 0; |
| 292 | 299 |
| 293 // Tells the View to destroy itself. | 300 // Tells the View to destroy itself. |
| 294 virtual void Destroy() = 0; | 301 virtual void Destroy() = 0; |
| 295 | 302 |
| 296 // Tells the View that the tooltip text for the current mouse position over | 303 // Tells the View that the tooltip text for the current mouse position over |
| 297 // the page has changed. | 304 // the page has changed. |
| 298 virtual void SetTooltipText(const base::string16& tooltip_text) = 0; | 305 virtual void SetTooltipText(const base::string16& tooltip_text) = 0; |
| 299 | 306 |
| 300 // Notifies the View that the renderer selection bounds has changed. | |
| 301 // |start_rect| and |end_rect| are the bounds end of the selection in the | |
| 302 // coordinate system of the render view. |start_direction| and |end_direction| | |
| 303 // indicates the direction at which the selection was made on touch devices. | |
| 304 virtual void SelectionBoundsChanged( | |
| 305 const ViewHostMsg_SelectionBounds_Params& params) = 0; | |
| 306 | |
| 307 // Copies the contents of the compositing surface, providing a new SkBitmap | 307 // Copies the contents of the compositing surface, providing a new SkBitmap |
| 308 // result via an asynchronously-run |callback|. |src_subrect| is specified in | 308 // result via an asynchronously-run |callback|. |src_subrect| is specified in |
| 309 // layer space coordinates for the current platform (e.g., DIP for Aura/Mac, | 309 // layer space coordinates for the current platform (e.g., DIP for Aura/Mac, |
| 310 // physical for Android), and is the region to be copied from this view. When | 310 // physical for Android), and is the region to be copied from this view. When |
| 311 // |src_subrect| is empty then the whole surface will be copied. The copy is | 311 // |src_subrect| is empty then the whole surface will be copied. The copy is |
| 312 // then scaled to a SkBitmap of size |dst_size|. If |dst_size| is empty then | 312 // then scaled to a SkBitmap of size |dst_size|. If |dst_size| is empty then |
| 313 // output will be unscaled. |callback| is run with true on success, | 313 // output will be unscaled. |callback| is run with true on success, |
| 314 // false otherwise. A smaller region than |src_subrect| may be copied | 314 // false otherwise. A smaller region than |src_subrect| may be copied |
| 315 // if the underlying surface is smaller than |src_subrect|. | 315 // if the underlying surface is smaller than |src_subrect|. |
| 316 virtual void CopyFromCompositingSurface( | 316 virtual void CopyFromCompositingSurface( |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_; | 467 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_; |
| 468 | 468 |
| 469 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; | 469 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; |
| 470 | 470 |
| 471 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); | 471 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); |
| 472 }; | 472 }; |
| 473 | 473 |
| 474 } // namespace content | 474 } // namespace content |
| 475 | 475 |
| 476 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ | 476 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ |
| OLD | NEW |