| 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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 // gfx::Rect. | 279 // gfx::Rect. |
| 280 virtual void SelectionBoundsChanged( | 280 virtual void SelectionBoundsChanged( |
| 281 const ViewHostMsg_SelectionBounds_Params& params); | 281 const ViewHostMsg_SelectionBounds_Params& params); |
| 282 | 282 |
| 283 // Updates the range of the marked text in an IME composition. | 283 // Updates the range of the marked text in an IME composition. |
| 284 virtual void ImeCompositionRangeChanged( | 284 virtual void ImeCompositionRangeChanged( |
| 285 const gfx::Range& range, | 285 const gfx::Range& range, |
| 286 const std::vector<gfx::Rect>& character_bounds); | 286 const std::vector<gfx::Rect>& character_bounds); |
| 287 | 287 |
| 288 //---------------------------------------------------------------------------- | 288 //---------------------------------------------------------------------------- |
| 289 // The following static methods are implemented by each platform. | |
| 290 | |
| 291 static void GetDefaultScreenInfo(blink::WebScreenInfo* results); | |
| 292 | |
| 293 //---------------------------------------------------------------------------- | |
| 294 // The following pure virtual methods are implemented by derived classes. | 289 // The following pure virtual methods are implemented by derived classes. |
| 295 | 290 |
| 296 // Perform all the initialization steps necessary for this object to represent | 291 // Perform all the initialization steps necessary for this object to represent |
| 297 // a popup (such as a <select> dropdown), then shows the popup at |pos|. | 292 // a popup (such as a <select> dropdown), then shows the popup at |pos|. |
| 298 virtual void InitAsPopup(RenderWidgetHostView* parent_host_view, | 293 virtual void InitAsPopup(RenderWidgetHostView* parent_host_view, |
| 299 const gfx::Rect& bounds) = 0; | 294 const gfx::Rect& bounds) = 0; |
| 300 | 295 |
| 301 // Perform all the initialization steps necessary for this object to represent | 296 // Perform all the initialization steps necessary for this object to represent |
| 302 // a full screen window. | 297 // a full screen window. |
| 303 // |reference_host_view| is the view associated with the creating page that | 298 // |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... |
| 364 virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) = 0; | 359 virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) = 0; |
| 365 | 360 |
| 366 // Compute the orientation type of the display assuming it is a mobile device. | 361 // Compute the orientation type of the display assuming it is a mobile device. |
| 367 static blink::WebScreenOrientationType GetOrientationTypeForMobile( | 362 static blink::WebScreenOrientationType GetOrientationTypeForMobile( |
| 368 const display::Display& display); | 363 const display::Display& display); |
| 369 | 364 |
| 370 // Compute the orientation type of the display assuming it is a desktop. | 365 // Compute the orientation type of the display assuming it is a desktop. |
| 371 static blink::WebScreenOrientationType GetOrientationTypeForDesktop( | 366 static blink::WebScreenOrientationType GetOrientationTypeForDesktop( |
| 372 const display::Display& display); | 367 const display::Display& display); |
| 373 | 368 |
| 374 virtual void GetScreenInfo(blink::WebScreenInfo* results) = 0; | |
| 375 | |
| 376 // Gets the bounds of the window, in screen coordinates. | 369 // Gets the bounds of the window, in screen coordinates. |
| 377 virtual gfx::Rect GetBoundsInRootWindow() = 0; | 370 virtual gfx::Rect GetBoundsInRootWindow() = 0; |
| 378 | 371 |
| 379 // Called by the RenderWidgetHost when an ambiguous gesture is detected to | 372 // Called by the RenderWidgetHost when an ambiguous gesture is detected to |
| 380 // show the disambiguation popup bubble. | 373 // show the disambiguation popup bubble. |
| 381 virtual void ShowDisambiguationPopup(const gfx::Rect& rect_pixels, | 374 virtual void ShowDisambiguationPopup(const gfx::Rect& rect_pixels, |
| 382 const SkBitmap& zoomed_bitmap); | 375 const SkBitmap& zoomed_bitmap); |
| 383 | 376 |
| 384 // Called by the WebContentsImpl when a user tries to navigate a new page on | 377 // Called by the WebContentsImpl when a user tries to navigate a new page on |
| 385 // main frame. | 378 // main frame. |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_; | 471 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_; |
| 479 | 472 |
| 480 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; | 473 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; |
| 481 | 474 |
| 482 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); | 475 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); |
| 483 }; | 476 }; |
| 484 | 477 |
| 485 } // namespace content | 478 } // namespace content |
| 486 | 479 |
| 487 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ | 480 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ |
| OLD | NEW |