| 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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 // gfx::Rect. | 271 // gfx::Rect. |
| 272 virtual void SelectionBoundsChanged( | 272 virtual void SelectionBoundsChanged( |
| 273 const ViewHostMsg_SelectionBounds_Params& params); | 273 const ViewHostMsg_SelectionBounds_Params& params); |
| 274 | 274 |
| 275 // Updates the range of the marked text in an IME composition. | 275 // Updates the range of the marked text in an IME composition. |
| 276 virtual void ImeCompositionRangeChanged( | 276 virtual void ImeCompositionRangeChanged( |
| 277 const gfx::Range& range, | 277 const gfx::Range& range, |
| 278 const std::vector<gfx::Rect>& character_bounds); | 278 const std::vector<gfx::Rect>& character_bounds); |
| 279 | 279 |
| 280 //---------------------------------------------------------------------------- | 280 //---------------------------------------------------------------------------- |
| 281 // The following static methods are implemented by each platform. | |
| 282 | |
| 283 static void GetDefaultScreenInfo(blink::WebScreenInfo* results); | |
| 284 | |
| 285 //---------------------------------------------------------------------------- | |
| 286 // The following pure virtual methods are implemented by derived classes. | 281 // The following pure virtual methods are implemented by derived classes. |
| 287 | 282 |
| 288 // Perform all the initialization steps necessary for this object to represent | 283 // Perform all the initialization steps necessary for this object to represent |
| 289 // 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|. |
| 290 virtual void InitAsPopup(RenderWidgetHostView* parent_host_view, | 285 virtual void InitAsPopup(RenderWidgetHostView* parent_host_view, |
| 291 const gfx::Rect& bounds) = 0; | 286 const gfx::Rect& bounds) = 0; |
| 292 | 287 |
| 293 // Perform all the initialization steps necessary for this object to represent | 288 // Perform all the initialization steps necessary for this object to represent |
| 294 // a full screen window. | 289 // a full screen window. |
| 295 // |reference_host_view| is the view associated with the creating page that | 290 // |reference_host_view| is the view associated with the creating page that |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) = 0; | 351 virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) = 0; |
| 357 | 352 |
| 358 // Compute the orientation type of the display assuming it is a mobile device. | 353 // Compute the orientation type of the display assuming it is a mobile device. |
| 359 static blink::WebScreenOrientationType GetOrientationTypeForMobile( | 354 static blink::WebScreenOrientationType GetOrientationTypeForMobile( |
| 360 const display::Display& display); | 355 const display::Display& display); |
| 361 | 356 |
| 362 // Compute the orientation type of the display assuming it is a desktop. | 357 // Compute the orientation type of the display assuming it is a desktop. |
| 363 static blink::WebScreenOrientationType GetOrientationTypeForDesktop( | 358 static blink::WebScreenOrientationType GetOrientationTypeForDesktop( |
| 364 const display::Display& display); | 359 const display::Display& display); |
| 365 | 360 |
| 366 virtual void GetScreenInfo(blink::WebScreenInfo* results) = 0; | |
| 367 | |
| 368 // Gets the bounds of the window, in screen coordinates. | 361 // Gets the bounds of the window, in screen coordinates. |
| 369 virtual gfx::Rect GetBoundsInRootWindow() = 0; | 362 virtual gfx::Rect GetBoundsInRootWindow() = 0; |
| 370 | 363 |
| 371 // Called by the RenderWidgetHost when an ambiguous gesture is detected to | 364 // Called by the RenderWidgetHost when an ambiguous gesture is detected to |
| 372 // show the disambiguation popup bubble. | 365 // show the disambiguation popup bubble. |
| 373 virtual void ShowDisambiguationPopup(const gfx::Rect& rect_pixels, | 366 virtual void ShowDisambiguationPopup(const gfx::Rect& rect_pixels, |
| 374 const SkBitmap& zoomed_bitmap); | 367 const SkBitmap& zoomed_bitmap); |
| 375 | 368 |
| 376 // Called by the WebContentsImpl when a user tries to navigate a new page on | 369 // Called by the WebContentsImpl when a user tries to navigate a new page on |
| 377 // main frame. | 370 // main frame. |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_; | 463 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_; |
| 471 | 464 |
| 472 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; | 465 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; |
| 473 | 466 |
| 474 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); | 467 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); |
| 475 }; | 468 }; |
| 476 | 469 |
| 477 } // namespace content | 470 } // namespace content |
| 478 | 471 |
| 479 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ | 472 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ |
| OLD | NEW |