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_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <deque> | 9 #include <deque> |
10 #include <string> | 10 #include <string> |
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 // Called by OnMsgInputEventAck() to process a wheel event ack message. | 526 // Called by OnMsgInputEventAck() to process a wheel event ack message. |
527 // This could result in a task being posted to allow additional wheel | 527 // This could result in a task being posted to allow additional wheel |
528 // input messages to be coalesced. | 528 // input messages to be coalesced. |
529 void ProcessWheelAck(bool processed); | 529 void ProcessWheelAck(bool processed); |
530 | 530 |
531 // Called on OnMsgInputEventAck() to process a touch event ack message. | 531 // Called on OnMsgInputEventAck() to process a touch event ack message. |
532 // This can result in a gesture event being generated and sent back to the | 532 // This can result in a gesture event being generated and sent back to the |
533 // renderer. | 533 // renderer. |
534 void ProcessTouchAck(WebKit::WebInputEvent::Type type, bool processed); | 534 void ProcessTouchAck(WebKit::WebInputEvent::Type type, bool processed); |
535 | 535 |
| 536 // Called when there is a new auto resize (using a post to avoid a stack |
| 537 // which may get in recursive loops). |
| 538 void DelayedAutoResized(); |
| 539 |
536 // Created during construction but initialized during Init*(). Therefore, it | 540 // Created during construction but initialized during Init*(). Therefore, it |
537 // is guaranteed never to be NULL, but its channel may be NULL if the | 541 // is guaranteed never to be NULL, but its channel may be NULL if the |
538 // renderer crashed, so you must always check that. | 542 // renderer crashed, so you must always check that. |
539 RenderProcessHost* process_; | 543 RenderProcessHost* process_; |
540 | 544 |
541 // The ID of the corresponding object in the Renderer Instance. | 545 // The ID of the corresponding object in the Renderer Instance. |
542 int routing_id_; | 546 int routing_id_; |
543 | 547 |
544 // True if renderer accessibility is enabled. This should only be set when a | 548 // True if renderer accessibility is enabled. This should only be set when a |
545 // screenreader is detected as it can potentially slow down Chrome. | 549 // screenreader is detected as it can potentially slow down Chrome. |
(...skipping 26 matching lines...) Expand all Loading... |
572 // The current size of the RenderWidget. | 576 // The current size of the RenderWidget. |
573 gfx::Size current_size_; | 577 gfx::Size current_size_; |
574 | 578 |
575 // The size we last sent as requested size to the renderer. |current_size_| | 579 // The size we last sent as requested size to the renderer. |current_size_| |
576 // is only updated once the resize message has been ack'd. This on the other | 580 // is only updated once the resize message has been ack'd. This on the other |
577 // hand is updated when the resize message is sent. This is very similar to | 581 // hand is updated when the resize message is sent. This is very similar to |
578 // |resize_ack_pending_|, but the latter is not set if the new size has width | 582 // |resize_ack_pending_|, but the latter is not set if the new size has width |
579 // or height zero, which is why we need this too. | 583 // or height zero, which is why we need this too. |
580 gfx::Size in_flight_size_; | 584 gfx::Size in_flight_size_; |
581 | 585 |
| 586 // The next auto resize to send. |
| 587 gfx::Size new_auto_size_; |
| 588 |
582 // True if the render widget host should track the render widget's size as | 589 // True if the render widget host should track the render widget's size as |
583 // opposed to visa versa. | 590 // opposed to visa versa. |
584 bool should_auto_resize_; | 591 bool should_auto_resize_; |
585 | 592 |
586 // True if a mouse move event was sent to the render view and we are waiting | 593 // True if a mouse move event was sent to the render view and we are waiting |
587 // for a corresponding ViewHostMsg_HandleInputEvent_ACK message. | 594 // for a corresponding ViewHostMsg_HandleInputEvent_ACK message. |
588 bool mouse_move_pending_; | 595 bool mouse_move_pending_; |
589 | 596 |
590 // The next mouse move event to send (only non-null while mouse_move_pending_ | 597 // The next mouse move event to send (only non-null while mouse_move_pending_ |
591 // is true). | 598 // is true). |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
691 bool has_touch_handler_; | 698 bool has_touch_handler_; |
692 | 699 |
693 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 700 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
694 | 701 |
695 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 702 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
696 }; | 703 }; |
697 | 704 |
698 } // namespace content | 705 } // namespace content |
699 | 706 |
700 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 707 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
OLD | NEW |