| 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 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 // active RenderWidgets. | 405 // active RenderWidgets. |
| 406 void SetSwappedOut(bool is_swapped_out); | 406 void SetSwappedOut(bool is_swapped_out); |
| 407 | 407 |
| 408 // Allows the process to exit once the unload handler has finished, if there | 408 // Allows the process to exit once the unload handler has finished, if there |
| 409 // are no other active RenderWidgets. | 409 // are no other active RenderWidgets. |
| 410 void WasSwappedOut(); | 410 void WasSwappedOut(); |
| 411 | 411 |
| 412 void DoDeferredClose(); | 412 void DoDeferredClose(); |
| 413 void NotifyOnClose(); | 413 void NotifyOnClose(); |
| 414 | 414 |
| 415 virtual void ResizeWebWidget(const ResizeParams& params); |
| 416 |
| 415 // Close the underlying WebWidget. | 417 // Close the underlying WebWidget. |
| 416 virtual void Close(); | 418 virtual void Close(); |
| 417 | 419 |
| 418 // Used to force the size of a window when running layout tests. | 420 // Used to force the size of a window when running layout tests. |
| 419 void SetWindowRectSynchronously(const gfx::Rect& new_window_rect); | 421 void SetWindowRectSynchronously(const gfx::Rect& new_window_rect); |
| 420 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 422 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
| 421 void SetExternalPopupOriginAdjustmentsForEmulation( | 423 void SetExternalPopupOriginAdjustmentsForEmulation( |
| 422 ExternalPopupMenu* popup, | 424 ExternalPopupMenu* popup, |
| 423 RenderWidgetScreenMetricsEmulator* emulator); | 425 RenderWidgetScreenMetricsEmulator* emulator); |
| 424 #endif | 426 #endif |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 // We store the current cursor object so we can avoid spamming SetCursor | 600 // We store the current cursor object so we can avoid spamming SetCursor |
| 599 // messages. | 601 // messages. |
| 600 WebCursor current_cursor_; | 602 WebCursor current_cursor_; |
| 601 | 603 |
| 602 // The size of the RenderWidget. | 604 // The size of the RenderWidget. |
| 603 gfx::Size size_; | 605 gfx::Size size_; |
| 604 | 606 |
| 605 // The size of the view's backing surface in non-DPI-adjusted pixels. | 607 // The size of the view's backing surface in non-DPI-adjusted pixels. |
| 606 gfx::Size physical_backing_size_; | 608 gfx::Size physical_backing_size_; |
| 607 | 609 |
| 608 // Whether or not Blink's viewport size should be shrunk by the height of the | |
| 609 // URL-bar (always false on platforms where URL-bar hiding isn't supported). | |
| 610 bool top_controls_shrink_blink_size_; | |
| 611 | |
| 612 // The height of the top controls (always 0 on platforms where URL-bar hiding | |
| 613 // isn't supported). | |
| 614 float top_controls_height_; | |
| 615 | |
| 616 // The size of the visible viewport in DPI-adjusted pixels. | 610 // The size of the visible viewport in DPI-adjusted pixels. |
| 617 gfx::Size visible_viewport_size_; | 611 gfx::Size visible_viewport_size_; |
| 618 | 612 |
| 619 // The area that must be reserved for drawing the resize corner. | 613 // The area that must be reserved for drawing the resize corner. |
| 620 gfx::Rect resizer_rect_; | 614 gfx::Rect resizer_rect_; |
| 621 | 615 |
| 622 // Flags for the next ViewHostMsg_UpdateRect message. | 616 // Flags for the next ViewHostMsg_UpdateRect message. |
| 623 int next_paint_flags_; | 617 int next_paint_flags_; |
| 624 | 618 |
| 625 // Whether the WebWidget is in auto resize mode, which is used for example | 619 // Whether the WebWidget is in auto resize mode, which is used for example |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 760 // are sent to each frame in the list for events such as changing | 754 // are sent to each frame in the list for events such as changing |
| 761 // visibility state for example. | 755 // visibility state for example. |
| 762 base::ObserverList<RenderFrameImpl> render_frames_; | 756 base::ObserverList<RenderFrameImpl> render_frames_; |
| 763 | 757 |
| 764 bool has_host_context_menu_location_; | 758 bool has_host_context_menu_location_; |
| 765 gfx::Point host_context_menu_location_; | 759 gfx::Point host_context_menu_location_; |
| 766 | 760 |
| 767 scoped_ptr<scheduler::RenderWidgetSchedulingState> | 761 scoped_ptr<scheduler::RenderWidgetSchedulingState> |
| 768 render_widget_scheduling_state_; | 762 render_widget_scheduling_state_; |
| 769 | 763 |
| 770 private: | |
| 771 // When emulated, this returns original device scale factor. | 764 // When emulated, this returns original device scale factor. |
| 772 float GetOriginalDeviceScaleFactor() const; | 765 float GetOriginalDeviceScaleFactor() const; |
| 773 | 766 |
| 767 private: |
| 774 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 768 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 775 }; | 769 }; |
| 776 | 770 |
| 777 } // namespace content | 771 } // namespace content |
| 778 | 772 |
| 779 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 773 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |