| 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 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "build/build_config.h" | 26 #include "build/build_config.h" |
| 27 #include "cc/resources/shared_bitmap.h" | 27 #include "cc/resources/shared_bitmap.h" |
| 28 #include "content/browser/renderer_host/event_with_latency_info.h" | 28 #include "content/browser/renderer_host/event_with_latency_info.h" |
| 29 #include "content/browser/renderer_host/input/input_ack_handler.h" | 29 #include "content/browser/renderer_host/input/input_ack_handler.h" |
| 30 #include "content/browser/renderer_host/input/input_router_client.h" | 30 #include "content/browser/renderer_host/input/input_router_client.h" |
| 31 #include "content/browser/renderer_host/input/render_widget_host_latency_tracker
.h" | 31 #include "content/browser/renderer_host/input/render_widget_host_latency_tracker
.h" |
| 32 #include "content/browser/renderer_host/input/synthetic_gesture.h" | 32 #include "content/browser/renderer_host/input/synthetic_gesture.h" |
| 33 #include "content/browser/renderer_host/input/touch_emulator_client.h" | 33 #include "content/browser/renderer_host/input/touch_emulator_client.h" |
| 34 #include "content/browser/renderer_host/render_widget_host_delegate.h" | 34 #include "content/browser/renderer_host/render_widget_host_delegate.h" |
| 35 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 35 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 36 #include "content/common/drag_event_source_info.h" |
| 36 #include "content/common/input/input_event_ack_state.h" | 37 #include "content/common/input/input_event_ack_state.h" |
| 37 #include "content/common/input/synthetic_gesture_packet.h" | 38 #include "content/common/input/synthetic_gesture_packet.h" |
| 38 #include "content/common/view_message_enums.h" | 39 #include "content/common/view_message_enums.h" |
| 39 #include "content/public/browser/readback_types.h" | 40 #include "content/public/browser/readback_types.h" |
| 40 #include "content/public/browser/render_widget_host.h" | 41 #include "content/public/browser/render_widget_host.h" |
| 41 #include "content/public/common/page_zoom.h" | 42 #include "content/public/common/page_zoom.h" |
| 42 #include "ipc/ipc_listener.h" | 43 #include "ipc/ipc_listener.h" |
| 43 #include "third_party/WebKit/public/platform/WebDisplayMode.h" | 44 #include "third_party/WebKit/public/platform/WebDisplayMode.h" |
| 44 #include "ui/base/ime/text_input_mode.h" | 45 #include "ui/base/ime/text_input_mode.h" |
| 45 #include "ui/base/ime/text_input_type.h" | 46 #include "ui/base/ime/text_input_type.h" |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 | 552 |
| 552 // The View associated with the RenderWidgetHost. The lifetime of this object | 553 // The View associated with the RenderWidgetHost. The lifetime of this object |
| 553 // is associated with the lifetime of the Render process. If the Renderer | 554 // is associated with the lifetime of the Render process. If the Renderer |
| 554 // crashes, its View is destroyed and this pointer becomes NULL, even though | 555 // crashes, its View is destroyed and this pointer becomes NULL, even though |
| 555 // render_view_host_ lives on to load another URL (creating a new View while | 556 // render_view_host_ lives on to load another URL (creating a new View while |
| 556 // doing so). | 557 // doing so). |
| 557 base::WeakPtr<RenderWidgetHostViewBase> view_; | 558 base::WeakPtr<RenderWidgetHostViewBase> view_; |
| 558 | 559 |
| 559 private: | 560 private: |
| 560 friend class MockRenderWidgetHost; | 561 friend class MockRenderWidgetHost; |
| 562 friend class TestRenderViewHost; |
| 561 | 563 |
| 562 // Tell this object to destroy itself. If |also_delete| is specified, the | 564 // Tell this object to destroy itself. If |also_delete| is specified, the |
| 563 // destructor is called as well. | 565 // destructor is called as well. |
| 564 void Destroy(bool also_delete); | 566 void Destroy(bool also_delete); |
| 565 | 567 |
| 566 // Called by |hang_monitor_timeout_| on delayed response from the renderer. | 568 // Called by |hang_monitor_timeout_| on delayed response from the renderer. |
| 567 void RendererIsUnresponsive(); | 569 void RendererIsUnresponsive(); |
| 568 | 570 |
| 569 // Called by |new_content_rendering_timeout_| if a renderer has loaded new | 571 // Called by |new_content_rendering_timeout_| if a renderer has loaded new |
| 570 // content but failed to produce a compositor frame in a defined time. | 572 // content but failed to produce a compositor frame in a defined time. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 597 bool privileged); | 599 bool privileged); |
| 598 void OnUnlockMouse(); | 600 void OnUnlockMouse(); |
| 599 void OnShowDisambiguationPopup(const gfx::Rect& rect_pixels, | 601 void OnShowDisambiguationPopup(const gfx::Rect& rect_pixels, |
| 600 const gfx::Size& size, | 602 const gfx::Size& size, |
| 601 const cc::SharedBitmapId& id); | 603 const cc::SharedBitmapId& id); |
| 602 void OnSelectionBoundsChanged( | 604 void OnSelectionBoundsChanged( |
| 603 const ViewHostMsg_SelectionBounds_Params& params); | 605 const ViewHostMsg_SelectionBounds_Params& params); |
| 604 void OnForwardCompositorProto(const std::vector<uint8_t>& proto); | 606 void OnForwardCompositorProto(const std::vector<uint8_t>& proto); |
| 605 void OnSetNeedsBeginFrames(bool needs_begin_frames); | 607 void OnSetNeedsBeginFrames(bool needs_begin_frames); |
| 606 void OnHittestData(const FrameHostMsg_HittestData_Params& params); | 608 void OnHittestData(const FrameHostMsg_HittestData_Params& params); |
| 609 void OnStartDragging(const DropData& drop_data, |
| 610 blink::WebDragOperationsMask operations_allowed, |
| 611 const SkBitmap& bitmap, |
| 612 const gfx::Vector2d& bitmap_offset_in_dip, |
| 613 const DragEventSourceInfo& event_info); |
| 607 | 614 |
| 608 // Called (either immediately or asynchronously) after we're done with our | 615 // Called (either immediately or asynchronously) after we're done with our |
| 609 // BackingStore and can send an ACK to the renderer so it can paint onto it | 616 // BackingStore and can send an ACK to the renderer so it can paint onto it |
| 610 // again. | 617 // again. |
| 611 void DidUpdateBackingStore(const ViewHostMsg_UpdateRect_Params& params, | 618 void DidUpdateBackingStore(const ViewHostMsg_UpdateRect_Params& params, |
| 612 const base::TimeTicks& paint_start); | 619 const base::TimeTicks& paint_start); |
| 613 | 620 |
| 614 // Give key press listeners a chance to handle this key press. This allow | 621 // Give key press listeners a chance to handle this key press. This allow |
| 615 // widgets that don't have focus to still handle key presses. | 622 // widgets that don't have focus to still handle key presses. |
| 616 bool KeyPressListenersHandleEvent(const NativeWebKeyboardEvent& event); | 623 bool KeyPressListenersHandleEvent(const NativeWebKeyboardEvent& event); |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 855 #endif | 862 #endif |
| 856 | 863 |
| 857 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 864 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
| 858 | 865 |
| 859 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 866 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
| 860 }; | 867 }; |
| 861 | 868 |
| 862 } // namespace content | 869 } // namespace content |
| 863 | 870 |
| 864 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 871 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
| OLD | NEW |