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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 #include "content/public/common/page_zoom.h" | 42 #include "content/public/common/page_zoom.h" |
43 #include "content/public/common/url_constants.h" | 43 #include "content/public/common/url_constants.h" |
44 #include "ipc/ipc_listener.h" | 44 #include "ipc/ipc_listener.h" |
45 #include "third_party/WebKit/public/platform/WebDisplayMode.h" | 45 #include "third_party/WebKit/public/platform/WebDisplayMode.h" |
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 class SkBitmap; |
52 struct FrameHostMsg_HittestData_Params; | 53 struct FrameHostMsg_HittestData_Params; |
53 struct ViewHostMsg_SelectionBounds_Params; | 54 struct ViewHostMsg_SelectionBounds_Params; |
54 struct ViewHostMsg_UpdateRect_Params; | 55 struct ViewHostMsg_UpdateRect_Params; |
55 | 56 |
56 namespace base { | |
57 class RefCountedBytes; | |
58 } | |
59 | |
60 namespace blink { | 57 namespace blink { |
61 class WebInputEvent; | 58 class WebInputEvent; |
62 class WebMouseEvent; | 59 class WebMouseEvent; |
63 struct WebCompositionUnderline; | 60 struct WebCompositionUnderline; |
64 } | 61 } |
65 | 62 |
66 #if defined(OS_MACOSX) | 63 #if defined(OS_MACOSX) |
67 namespace device { | 64 namespace device { |
68 class PowerSaveBlocker; | 65 class PowerSaveBlocker; |
69 } // namespace device | 66 } // namespace device |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 void DragSourceEndedAt(const gfx::Point& client_pt, | 199 void DragSourceEndedAt(const gfx::Point& client_pt, |
203 const gfx::Point& screen_pt, | 200 const gfx::Point& screen_pt, |
204 blink::WebDragOperation operation) override; | 201 blink::WebDragOperation operation) override; |
205 void DragSourceSystemDragEnded() override; | 202 void DragSourceSystemDragEnded() override; |
206 void FilterDropData(DropData* drop_data) override; | 203 void FilterDropData(DropData* drop_data) override; |
207 | 204 |
208 // Notification that the screen info has changed. | 205 // Notification that the screen info has changed. |
209 void NotifyScreenInfoChanged(); | 206 void NotifyScreenInfoChanged(); |
210 | 207 |
211 // Forces redraw in the renderer and when the update reaches the browser | 208 // Forces redraw in the renderer and when the update reaches the browser |
212 // grabs snapshot from the compositor. Returns PNG-encoded snapshot. | 209 // grabs snapshot from the compositor. Returns an SkBitmap containing the |
213 using GetSnapshotFromBrowserCallback = | 210 // snapshot or an empty SkBitmap if taking the snapshot failed. |
214 base::Callback<void(const unsigned char*, size_t)>; | 211 using GetSnapshotFromBrowserCallback = base::Callback<void(const SkBitmap&)>; |
215 void GetSnapshotFromBrowser(const GetSnapshotFromBrowserCallback& callback); | 212 void GetSnapshotFromBrowser(const GetSnapshotFromBrowserCallback& callback); |
216 | 213 |
217 const NativeWebKeyboardEvent* GetLastKeyboardEvent() const; | 214 const NativeWebKeyboardEvent* GetLastKeyboardEvent() const; |
218 | 215 |
219 // Sets the View of this RenderWidgetHost. | 216 // Sets the View of this RenderWidgetHost. |
220 void SetView(RenderWidgetHostViewBase* view); | 217 void SetView(RenderWidgetHostViewBase* view); |
221 | 218 |
222 RenderWidgetHostDelegate* delegate() const { return delegate_; } | 219 RenderWidgetHostDelegate* delegate() const { return delegate_; } |
223 | 220 |
224 bool empty() const { return current_size_.IsEmpty(); } | 221 bool empty() const { return current_size_.IsEmpty(); } |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
693 void OnUnexpectedEventAck(UnexpectedEventAckType type) override; | 690 void OnUnexpectedEventAck(UnexpectedEventAckType type) override; |
694 | 691 |
695 void OnSyntheticGestureCompleted(SyntheticGesture::Result result); | 692 void OnSyntheticGestureCompleted(SyntheticGesture::Result result); |
696 | 693 |
697 // Called when there is a new auto resize (using a post to avoid a stack | 694 // Called when there is a new auto resize (using a post to avoid a stack |
698 // which may get in recursive loops). | 695 // which may get in recursive loops). |
699 void DelayedAutoResized(); | 696 void DelayedAutoResized(); |
700 | 697 |
701 void WindowSnapshotReachedScreen(int snapshot_id); | 698 void WindowSnapshotReachedScreen(int snapshot_id); |
702 | 699 |
703 void OnSnapshotDataReceived(int snapshot_id, | 700 void OnSnapshotReceived(int snapshot_id, |
704 const unsigned char* png, | 701 int retry_count, |
705 size_t size); | 702 const SkBitmap& bitmap, |
706 | 703 ReadbackResponse response); |
707 void OnSnapshotDataReceivedAsync( | |
708 int snapshot_id, | |
709 scoped_refptr<base::RefCountedBytes> png_data); | |
710 | 704 |
711 // 1. Grants permissions to URL (if any) | 705 // 1. Grants permissions to URL (if any) |
712 // 2. Grants permissions to filenames | 706 // 2. Grants permissions to filenames |
713 // 3. Grants permissions to file system files. | 707 // 3. Grants permissions to file system files. |
714 // 4. Register the files with the IsolatedContext. | 708 // 4. Register the files with the IsolatedContext. |
715 void GrantFileAccessFromDropData(DropData* drop_data); | 709 void GrantFileAccessFromDropData(DropData* drop_data); |
716 | 710 |
717 // true if a renderer has once been valid. We use this flag to display a sad | 711 // true if a renderer has once been valid. We use this flag to display a sad |
718 // tab only when we lose our renderer and not if a paint occurs during | 712 // tab only when we lose our renderer and not if a paint occurs during |
719 // initialization. | 713 // initialization. |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
907 #endif | 901 #endif |
908 | 902 |
909 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 903 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
910 | 904 |
911 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 905 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
912 }; | 906 }; |
913 | 907 |
914 } // namespace content | 908 } // namespace content |
915 | 909 |
916 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 910 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
OLD | NEW |