| 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 <deque> | 8 #include <deque> |
| 9 #include <map> | 9 #include <map> |
| 10 | 10 |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 bool never_visible); | 357 bool never_visible); |
| 358 | 358 |
| 359 ~RenderWidget() override; | 359 ~RenderWidget() override; |
| 360 | 360 |
| 361 static blink::WebWidget* CreateWebFrameWidget(RenderWidget* render_widget, | 361 static blink::WebWidget* CreateWebFrameWidget(RenderWidget* render_widget, |
| 362 blink::WebLocalFrame* frame); | 362 blink::WebLocalFrame* frame); |
| 363 | 363 |
| 364 // Creates a WebWidget based on the popup type. | 364 // Creates a WebWidget based on the popup type. |
| 365 static blink::WebWidget* CreateWebWidget(RenderWidget* render_widget); | 365 static blink::WebWidget* CreateWebWidget(RenderWidget* render_widget); |
| 366 | 366 |
| 367 // Initializes this view with the given opener. CompleteInit must be called | 367 // Initializes this view with the given opener. |
| 368 // later. | |
| 369 bool Init(int32 opener_id); | 368 bool Init(int32 opener_id); |
| 370 | 369 |
| 371 // Called by Init and subclasses to perform initialization. | 370 // Called by Init and subclasses to perform initialization. |
| 372 bool DoInit(int32 opener_id, | 371 bool DoInit(int32 opener_id, |
| 373 blink::WebWidget* web_widget, | 372 blink::WebWidget* web_widget, |
| 374 IPC::SyncMessage* create_widget_message); | 373 IPC::SyncMessage* create_widget_message); |
| 375 | 374 |
| 376 // Finishes creation of a pending view started with Init. | |
| 377 void CompleteInit(); | |
| 378 | |
| 379 // Sets whether this RenderWidget has been swapped out to be displayed by | 375 // Sets whether this RenderWidget has been swapped out to be displayed by |
| 380 // a RenderWidget in a different process. If so, no new IPC messages will be | 376 // a RenderWidget in a different process. If so, no new IPC messages will be |
| 381 // sent (only ACKs) and the process is free to exit when there are no other | 377 // sent (only ACKs) and the process is free to exit when there are no other |
| 382 // active RenderWidgets. | 378 // active RenderWidgets. |
| 383 void SetSwappedOut(bool is_swapped_out); | 379 void SetSwappedOut(bool is_swapped_out); |
| 384 | 380 |
| 385 // Allows the process to exit once the unload handler has finished, if there | 381 // Allows the process to exit once the unload handler has finished, if there |
| 386 // are no other active RenderWidgets. | 382 // are no other active RenderWidgets. |
| 387 void WasSwappedOut(); | 383 void WasSwappedOut(); |
| 388 | 384 |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 // MSG_ROUTING_NONE. This is used in determining ownership when opening | 595 // MSG_ROUTING_NONE. This is used in determining ownership when opening |
| 600 // child tabs. See RenderWidget::createWebViewWithRequest. | 596 // child tabs. See RenderWidget::createWebViewWithRequest. |
| 601 // | 597 // |
| 602 // This ID may refer to an invalid view if that view is closed before this | 598 // This ID may refer to an invalid view if that view is closed before this |
| 603 // view is. | 599 // view is. |
| 604 int32 opener_id_; | 600 int32 opener_id_; |
| 605 | 601 |
| 606 // The rect where this view should be initially shown. | 602 // The rect where this view should be initially shown. |
| 607 gfx::Rect initial_rect_; | 603 gfx::Rect initial_rect_; |
| 608 | 604 |
| 609 bool init_complete_; | |
| 610 | |
| 611 // We store the current cursor object so we can avoid spamming SetCursor | 605 // We store the current cursor object so we can avoid spamming SetCursor |
| 612 // messages. | 606 // messages. |
| 613 WebCursor current_cursor_; | 607 WebCursor current_cursor_; |
| 614 | 608 |
| 615 // The size of the RenderWidget. | 609 // The size of the RenderWidget. |
| 616 gfx::Size size_; | 610 gfx::Size size_; |
| 617 | 611 |
| 618 // The size of the view's backing surface in non-DPI-adjusted pixels. | 612 // The size of the view's backing surface in non-DPI-adjusted pixels. |
| 619 gfx::Size physical_backing_size_; | 613 gfx::Size physical_backing_size_; |
| 620 | 614 |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 801 ui::MenuSourceType context_menu_source_type_; | 795 ui::MenuSourceType context_menu_source_type_; |
| 802 bool has_host_context_menu_location_; | 796 bool has_host_context_menu_location_; |
| 803 gfx::Point host_context_menu_location_; | 797 gfx::Point host_context_menu_location_; |
| 804 | 798 |
| 805 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 799 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 806 }; | 800 }; |
| 807 | 801 |
| 808 } // namespace content | 802 } // namespace content |
| 809 | 803 |
| 810 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 804 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |