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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 #include "ui/base/ime/text_input_mode.h" | 46 #include "ui/base/ime/text_input_mode.h" |
47 #include "ui/base/ime/text_input_type.h" | 47 #include "ui/base/ime/text_input_type.h" |
48 #include "ui/events/gesture_detection/gesture_provider_config_helper.h" | 48 #include "ui/events/gesture_detection/gesture_provider_config_helper.h" |
49 #include "ui/events/latency_info.h" | 49 #include "ui/events/latency_info.h" |
50 #include "ui/gfx/native_widget_types.h" | 50 #include "ui/gfx/native_widget_types.h" |
51 | 51 |
52 struct FrameHostMsg_HittestData_Params; | 52 struct FrameHostMsg_HittestData_Params; |
53 struct ViewHostMsg_SelectionBounds_Params; | 53 struct ViewHostMsg_SelectionBounds_Params; |
54 struct ViewHostMsg_UpdateRect_Params; | 54 struct ViewHostMsg_UpdateRect_Params; |
55 | 55 |
| 56 namespace base { |
| 57 class RefCountedBytes; |
| 58 } |
| 59 |
56 namespace blink { | 60 namespace blink { |
57 class WebInputEvent; | 61 class WebInputEvent; |
58 class WebMouseEvent; | 62 class WebMouseEvent; |
59 struct WebCompositionUnderline; | 63 struct WebCompositionUnderline; |
60 } | 64 } |
61 | 65 |
62 #if defined(OS_MACOSX) | 66 #if defined(OS_MACOSX) |
63 namespace device { | 67 namespace device { |
64 class PowerSaveBlocker; | 68 class PowerSaveBlocker; |
65 } // namespace device | 69 } // namespace device |
66 #endif | 70 #endif |
67 | 71 |
68 namespace gfx { | 72 namespace gfx { |
69 class Image; | |
70 class Range; | 73 class Range; |
71 } | 74 } |
72 | 75 |
73 namespace content { | 76 namespace content { |
74 | 77 |
75 class BrowserAccessibilityManager; | 78 class BrowserAccessibilityManager; |
76 class InputRouter; | 79 class InputRouter; |
77 class MockRenderWidgetHost; | 80 class MockRenderWidgetHost; |
78 class RenderWidgetHostOwnerDelegate; | 81 class RenderWidgetHostOwnerDelegate; |
79 class SyntheticGestureController; | 82 class SyntheticGestureController; |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 void DragSourceEndedAt(const gfx::Point& client_pt, | 202 void DragSourceEndedAt(const gfx::Point& client_pt, |
200 const gfx::Point& screen_pt, | 203 const gfx::Point& screen_pt, |
201 blink::WebDragOperation operation) override; | 204 blink::WebDragOperation operation) override; |
202 void DragSourceSystemDragEnded() override; | 205 void DragSourceSystemDragEnded() override; |
203 void FilterDropData(DropData* drop_data) override; | 206 void FilterDropData(DropData* drop_data) override; |
204 | 207 |
205 // Notification that the screen info has changed. | 208 // Notification that the screen info has changed. |
206 void NotifyScreenInfoChanged(); | 209 void NotifyScreenInfoChanged(); |
207 | 210 |
208 // Forces redraw in the renderer and when the update reaches the browser | 211 // Forces redraw in the renderer and when the update reaches the browser |
209 // grabs snapshot from the compositor. On MacOS, the snapshot is taken from | 212 // grabs snapshot from the compositor. Returns PNG-encoded snapshot. |
210 // the Cocoa view for end-to-end testing purposes. Returns a gfx::Image that | |
211 // is backed by an NSImage on MacOS or by an SkBitmap otherwise. The | |
212 // gfx::Image may be empty if the snapshot failed. | |
213 using GetSnapshotFromBrowserCallback = | 213 using GetSnapshotFromBrowserCallback = |
214 base::Callback<void(const gfx::Image&)>; | 214 base::Callback<void(const unsigned char*, size_t)>; |
215 void GetSnapshotFromBrowser(const GetSnapshotFromBrowserCallback& callback); | 215 void GetSnapshotFromBrowser(const GetSnapshotFromBrowserCallback& callback); |
216 | 216 |
217 const NativeWebKeyboardEvent* GetLastKeyboardEvent() const; | 217 const NativeWebKeyboardEvent* GetLastKeyboardEvent() const; |
218 | 218 |
219 // Sets the View of this RenderWidgetHost. | 219 // Sets the View of this RenderWidgetHost. |
220 void SetView(RenderWidgetHostViewBase* view); | 220 void SetView(RenderWidgetHostViewBase* view); |
221 | 221 |
222 RenderWidgetHostDelegate* delegate() const { return delegate_; } | 222 RenderWidgetHostDelegate* delegate() const { return delegate_; } |
223 | 223 |
224 bool empty() const { return current_size_.IsEmpty(); } | 224 bool empty() const { return current_size_.IsEmpty(); } |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
695 void OnUnexpectedEventAck(UnexpectedEventAckType type) override; | 695 void OnUnexpectedEventAck(UnexpectedEventAckType type) override; |
696 | 696 |
697 void OnSyntheticGestureCompleted(SyntheticGesture::Result result); | 697 void OnSyntheticGestureCompleted(SyntheticGesture::Result result); |
698 | 698 |
699 // Called when there is a new auto resize (using a post to avoid a stack | 699 // Called when there is a new auto resize (using a post to avoid a stack |
700 // which may get in recursive loops). | 700 // which may get in recursive loops). |
701 void DelayedAutoResized(); | 701 void DelayedAutoResized(); |
702 | 702 |
703 void WindowSnapshotReachedScreen(int snapshot_id); | 703 void WindowSnapshotReachedScreen(int snapshot_id); |
704 | 704 |
705 void OnSnapshotReceived(int snapshot_id, const gfx::Image& image); | 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); |
706 | 712 |
707 // 1. Grants permissions to URL (if any) | 713 // 1. Grants permissions to URL (if any) |
708 // 2. Grants permissions to filenames | 714 // 2. Grants permissions to filenames |
709 // 3. Grants permissions to file system files. | 715 // 3. Grants permissions to file system files. |
710 // 4. Register the files with the IsolatedContext. | 716 // 4. Register the files with the IsolatedContext. |
711 void GrantFileAccessFromDropData(DropData* drop_data); | 717 void GrantFileAccessFromDropData(DropData* drop_data); |
712 | 718 |
713 // true if a renderer has once been valid. We use this flag to display a sad | 719 // true if a renderer has once been valid. We use this flag to display a sad |
714 // tab only when we lose our renderer and not if a paint occurs during | 720 // tab only when we lose our renderer and not if a paint occurs during |
715 // initialization. | 721 // initialization. |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
903 #endif | 909 #endif |
904 | 910 |
905 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 911 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
906 | 912 |
907 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 913 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
908 }; | 914 }; |
909 | 915 |
910 } // namespace content | 916 } // namespace content |
911 | 917 |
912 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 918 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
OLD | NEW |