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 <deque> | 8 #include <deque> |
9 #include <list> | 9 #include <list> |
10 #include <map> | 10 #include <map> |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 int acc_obj_id, gfx::Point point) OVERRIDE; | 185 int acc_obj_id, gfx::Point point) OVERRIDE; |
186 virtual void AccessibilitySetTextSelection( | 186 virtual void AccessibilitySetTextSelection( |
187 int acc_obj_id, int start_offset, int end_offset) OVERRIDE; | 187 int acc_obj_id, int start_offset, int end_offset) OVERRIDE; |
188 virtual bool AccessibilityViewHasFocus() const OVERRIDE; | 188 virtual bool AccessibilityViewHasFocus() const OVERRIDE; |
189 virtual gfx::Rect AccessibilityGetViewBounds() const OVERRIDE; | 189 virtual gfx::Rect AccessibilityGetViewBounds() const OVERRIDE; |
190 virtual gfx::Point AccessibilityOriginInScreen(const gfx::Rect& bounds) | 190 virtual gfx::Point AccessibilityOriginInScreen(const gfx::Rect& bounds) |
191 const OVERRIDE; | 191 const OVERRIDE; |
192 virtual void AccessibilityHitTest(const gfx::Point& point) OVERRIDE; | 192 virtual void AccessibilityHitTest(const gfx::Point& point) OVERRIDE; |
193 virtual void AccessibilityFatalError() OVERRIDE; | 193 virtual void AccessibilityFatalError() OVERRIDE; |
194 | 194 |
195 // Forces redraw in the renderer and when the update reaches the browser | |
196 // grabs snapshot from the compositor. Returns PNG-encoded snapshot. | |
197 void GetSnapshotFromBrowser( | |
198 const base::Callback<void(const unsigned char*,size_t)> callback); | |
199 | |
200 const NativeWebKeyboardEvent* GetLastKeyboardEvent() const; | 195 const NativeWebKeyboardEvent* GetLastKeyboardEvent() const; |
201 | 196 |
202 // Notification that the screen info has changed. | 197 // Notification that the screen info has changed. |
203 void NotifyScreenInfoChanged(); | 198 void NotifyScreenInfoChanged(); |
204 | 199 |
205 // Invalidates the cached screen info so that next resize request | 200 // Invalidates the cached screen info so that next resize request |
206 // will carry the up to date screen info. Unlike | 201 // will carry the up to date screen info. Unlike |
207 // |NotifyScreenInfoChanged|, this doesn't send a message to the renderer. | 202 // |NotifyScreenInfoChanged|, this doesn't send a message to the renderer. |
208 void InvalidateScreenInfo(); | 203 void InvalidateScreenInfo(); |
209 | 204 |
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
691 virtual void OnGestureEventAck(const GestureEventWithLatencyInfo& event, | 686 virtual void OnGestureEventAck(const GestureEventWithLatencyInfo& event, |
692 InputEventAckState ack_result) OVERRIDE; | 687 InputEventAckState ack_result) OVERRIDE; |
693 virtual void OnUnexpectedEventAck(UnexpectedEventAckType type) OVERRIDE; | 688 virtual void OnUnexpectedEventAck(UnexpectedEventAckType type) OVERRIDE; |
694 | 689 |
695 void OnSyntheticGestureCompleted(SyntheticGesture::Result result); | 690 void OnSyntheticGestureCompleted(SyntheticGesture::Result result); |
696 | 691 |
697 // Called when there is a new auto resize (using a post to avoid a stack | 692 // Called when there is a new auto resize (using a post to avoid a stack |
698 // which may get in recursive loops). | 693 // which may get in recursive loops). |
699 void DelayedAutoResized(); | 694 void DelayedAutoResized(); |
700 | 695 |
701 void WindowOldSnapshotReachedScreen(int snapshot_id); | |
702 | |
703 void WindowSnapshotReachedScreen(int snapshot_id); | 696 void WindowSnapshotReachedScreen(int snapshot_id); |
704 | 697 |
705 void OnSnapshotDataReceived(int snapshot_id, | |
706 const unsigned char* png, | |
707 size_t size); | |
708 | |
709 void OnSnapshotDataReceivedAsync( | |
710 int snapshot_id, | |
711 scoped_refptr<base::RefCountedBytes> png_data); | |
712 | |
713 // Send a message to the renderer process to change the accessibility mode. | 698 // Send a message to the renderer process to change the accessibility mode. |
714 void SetAccessibilityMode(AccessibilityMode AccessibilityMode); | 699 void SetAccessibilityMode(AccessibilityMode AccessibilityMode); |
715 | 700 |
716 // Our delegate, which wants to know mainly about keyboard events. | 701 // Our delegate, which wants to know mainly about keyboard events. |
717 // It will remain non-NULL until DetachDelegate() is called. | 702 // It will remain non-NULL until DetachDelegate() is called. |
718 RenderWidgetHostDelegate* delegate_; | 703 RenderWidgetHostDelegate* delegate_; |
719 | 704 |
720 // Created during construction but initialized during Init*(). Therefore, it | 705 // Created during construction but initialized during Init*(). Therefore, it |
721 // is guaranteed never to be NULL, but its channel may be NULL if the | 706 // is guaranteed never to be NULL, but its channel may be NULL if the |
722 // renderer crashed, so you must always check that. | 707 // renderer crashed, so you must always check that. |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
870 scoped_ptr<InputRouter> input_router_; | 855 scoped_ptr<InputRouter> input_router_; |
871 | 856 |
872 scoped_ptr<TimeoutMonitor> hang_monitor_timeout_; | 857 scoped_ptr<TimeoutMonitor> hang_monitor_timeout_; |
873 | 858 |
874 #if defined(OS_WIN) | 859 #if defined(OS_WIN) |
875 std::list<HWND> dummy_windows_for_activation_; | 860 std::list<HWND> dummy_windows_for_activation_; |
876 #endif | 861 #endif |
877 | 862 |
878 int64 last_input_number_; | 863 int64 last_input_number_; |
879 | 864 |
880 int next_browser_snapshot_id_; | |
881 typedef std::map<int, | |
882 base::Callback<void(const unsigned char*, size_t)> > PendingSnapshotMap; | |
883 PendingSnapshotMap pending_browser_snapshots_; | |
884 | |
885 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 865 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
886 }; | 866 }; |
887 | 867 |
888 } // namespace content | 868 } // namespace content |
889 | 869 |
890 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 870 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
OLD | NEW |