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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 class RefCountedBytes; | 55 class RefCountedBytes; |
56 } | 56 } |
57 | 57 |
58 namespace blink { | 58 namespace blink { |
59 class WebInputEvent; | 59 class WebInputEvent; |
60 #if defined(OS_ANDROID) | 60 #if defined(OS_ANDROID) |
61 class WebLayer; | 61 class WebLayer; |
62 #endif | 62 #endif |
63 class WebMouseEvent; | 63 class WebMouseEvent; |
64 struct WebCompositionUnderline; | 64 struct WebCompositionUnderline; |
65 struct WebScreenInfo; | |
66 } | 65 } |
67 | 66 |
68 namespace cc { | 67 namespace cc { |
69 class CompositorFrameAck; | 68 class CompositorFrameAck; |
70 } | 69 } |
71 | 70 |
72 #if defined(OS_MACOSX) | 71 #if defined(OS_MACOSX) |
73 namespace device { | 72 namespace device { |
74 class PowerSaveBlocker; | 73 class PowerSaveBlocker; |
75 } // namespace device | 74 } // namespace device |
76 #endif | 75 #endif |
77 | 76 |
78 namespace gfx { | 77 namespace gfx { |
79 class Range; | 78 class Range; |
80 } | 79 } |
81 | 80 |
82 namespace content { | 81 namespace content { |
83 | 82 |
84 class BrowserAccessibilityManager; | 83 class BrowserAccessibilityManager; |
85 class InputRouter; | 84 class InputRouter; |
86 class MockRenderWidgetHost; | 85 class MockRenderWidgetHost; |
87 class RenderWidgetHostOwnerDelegate; | 86 class RenderWidgetHostOwnerDelegate; |
88 class SyntheticGestureController; | 87 class SyntheticGestureController; |
89 class TimeoutMonitor; | 88 class TimeoutMonitor; |
90 class TouchEmulator; | 89 class TouchEmulator; |
91 class WebCursor; | 90 class WebCursor; |
92 struct EditCommand; | 91 struct EditCommand; |
93 struct ResizeParams; | 92 struct ResizeParams; |
| 93 struct ScreenInfo; |
94 struct TextInputState; | 94 struct TextInputState; |
95 | 95 |
96 // This implements the RenderWidgetHost interface that is exposed to | 96 // This implements the RenderWidgetHost interface that is exposed to |
97 // embedders of content, and adds things only visible to content. | 97 // embedders of content, and adds things only visible to content. |
98 class CONTENT_EXPORT RenderWidgetHostImpl : public RenderWidgetHost, | 98 class CONTENT_EXPORT RenderWidgetHostImpl : public RenderWidgetHost, |
99 public InputRouterClient, | 99 public InputRouterClient, |
100 public InputAckHandler, | 100 public InputAckHandler, |
101 public TouchEmulatorClient, | 101 public TouchEmulatorClient, |
102 public IPC::Listener { | 102 public IPC::Listener { |
103 public: | 103 public: |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 void WasResized() override; | 172 void WasResized() override; |
173 void AddKeyPressEventCallback(const KeyPressEventCallback& callback) override; | 173 void AddKeyPressEventCallback(const KeyPressEventCallback& callback) override; |
174 void RemoveKeyPressEventCallback( | 174 void RemoveKeyPressEventCallback( |
175 const KeyPressEventCallback& callback) override; | 175 const KeyPressEventCallback& callback) override; |
176 void AddMouseEventCallback(const MouseEventCallback& callback) override; | 176 void AddMouseEventCallback(const MouseEventCallback& callback) override; |
177 void RemoveMouseEventCallback(const MouseEventCallback& callback) override; | 177 void RemoveMouseEventCallback(const MouseEventCallback& callback) override; |
178 void AddInputEventObserver( | 178 void AddInputEventObserver( |
179 RenderWidgetHost::InputEventObserver* observer) override; | 179 RenderWidgetHost::InputEventObserver* observer) override; |
180 void RemoveInputEventObserver( | 180 void RemoveInputEventObserver( |
181 RenderWidgetHost::InputEventObserver* observer) override; | 181 RenderWidgetHost::InputEventObserver* observer) override; |
182 void GetWebScreenInfo(blink::WebScreenInfo* result) override; | 182 void GetScreenInfo(content::ScreenInfo* result) override; |
183 void HandleCompositorProto(const std::vector<uint8_t>& proto) override; | 183 void HandleCompositorProto(const std::vector<uint8_t>& proto) override; |
184 | 184 |
185 // Notification that the screen info has changed. | 185 // Notification that the screen info has changed. |
186 void NotifyScreenInfoChanged(); | 186 void NotifyScreenInfoChanged(); |
187 | 187 |
188 // Forces redraw in the renderer and when the update reaches the browser | 188 // Forces redraw in the renderer and when the update reaches the browser |
189 // grabs snapshot from the compositor. Returns PNG-encoded snapshot. | 189 // grabs snapshot from the compositor. Returns PNG-encoded snapshot. |
190 using GetSnapshotFromBrowserCallback = | 190 using GetSnapshotFromBrowserCallback = |
191 base::Callback<void(const unsigned char*, size_t)>; | 191 base::Callback<void(const unsigned char*, size_t)>; |
192 void GetSnapshotFromBrowser(const GetSnapshotFromBrowserCallback& callback); | 192 void GetSnapshotFromBrowser(const GetSnapshotFromBrowserCallback& callback); |
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
841 #endif | 841 #endif |
842 | 842 |
843 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 843 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
844 | 844 |
845 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 845 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
846 }; | 846 }; |
847 | 847 |
848 } // namespace content | 848 } // namespace content |
849 | 849 |
850 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 850 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
OLD | NEW |