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_RENDERER_RENDER_WIDGET_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_H_ |
6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ | 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 // active RenderWidgets. | 403 // active RenderWidgets. |
404 void SetSwappedOut(bool is_swapped_out); | 404 void SetSwappedOut(bool is_swapped_out); |
405 | 405 |
406 // Allows the process to exit once the unload handler has finished, if there | 406 // Allows the process to exit once the unload handler has finished, if there |
407 // are no other active RenderWidgets. | 407 // are no other active RenderWidgets. |
408 void WasSwappedOut(); | 408 void WasSwappedOut(); |
409 | 409 |
410 void DoDeferredClose(); | 410 void DoDeferredClose(); |
411 void NotifyOnClose(); | 411 void NotifyOnClose(); |
412 | 412 |
| 413 gfx::Size GetSizeForWebWidget() const; |
| 414 virtual void ResizeWebWidget(); |
| 415 |
413 // Close the underlying WebWidget. | 416 // Close the underlying WebWidget. |
414 virtual void Close(); | 417 virtual void Close(); |
415 | 418 |
416 // Used to force the size of a window when running layout tests. | 419 // Used to force the size of a window when running layout tests. |
417 void SetWindowRectSynchronously(const gfx::Rect& new_window_rect); | 420 void SetWindowRectSynchronously(const gfx::Rect& new_window_rect); |
418 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 421 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
419 void SetExternalPopupOriginAdjustmentsForEmulation( | 422 void SetExternalPopupOriginAdjustmentsForEmulation( |
420 ExternalPopupMenu* popup, | 423 ExternalPopupMenu* popup, |
421 RenderWidgetScreenMetricsEmulator* emulator); | 424 RenderWidgetScreenMetricsEmulator* emulator); |
422 #endif | 425 #endif |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 // We store the current cursor object so we can avoid spamming SetCursor | 595 // We store the current cursor object so we can avoid spamming SetCursor |
593 // messages. | 596 // messages. |
594 WebCursor current_cursor_; | 597 WebCursor current_cursor_; |
595 | 598 |
596 // The size of the RenderWidget. | 599 // The size of the RenderWidget. |
597 gfx::Size size_; | 600 gfx::Size size_; |
598 | 601 |
599 // The size of the view's backing surface in non-DPI-adjusted pixels. | 602 // The size of the view's backing surface in non-DPI-adjusted pixels. |
600 gfx::Size physical_backing_size_; | 603 gfx::Size physical_backing_size_; |
601 | 604 |
602 // Whether or not Blink's viewport size should be shrunk by the height of the | |
603 // URL-bar (always false on platforms where URL-bar hiding isn't supported). | |
604 bool top_controls_shrink_blink_size_; | |
605 | |
606 // The height of the top controls (always 0 on platforms where URL-bar hiding | |
607 // isn't supported). | |
608 float top_controls_height_; | |
609 | |
610 // The size of the visible viewport in DPI-adjusted pixels. | 605 // The size of the visible viewport in DPI-adjusted pixels. |
611 gfx::Size visible_viewport_size_; | 606 gfx::Size visible_viewport_size_; |
612 | 607 |
613 // The area that must be reserved for drawing the resize corner. | 608 // The area that must be reserved for drawing the resize corner. |
614 gfx::Rect resizer_rect_; | 609 gfx::Rect resizer_rect_; |
615 | 610 |
616 // Flags for the next ViewHostMsg_UpdateRect message. | 611 // Flags for the next ViewHostMsg_UpdateRect message. |
617 int next_paint_flags_; | 612 int next_paint_flags_; |
618 | 613 |
619 // Whether the WebWidget is in auto resize mode, which is used for example | 614 // Whether the WebWidget is in auto resize mode, which is used for example |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
764 private: | 759 private: |
765 // When emulated, this returns original device scale factor. | 760 // When emulated, this returns original device scale factor. |
766 float GetOriginalDeviceScaleFactor() const; | 761 float GetOriginalDeviceScaleFactor() const; |
767 | 762 |
768 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 763 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
769 }; | 764 }; |
770 | 765 |
771 } // namespace content | 766 } // namespace content |
772 | 767 |
773 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 768 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
OLD | NEW |