| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 | 131 |
| 132 // RenderWidgetHost implementation. | 132 // RenderWidgetHost implementation. |
| 133 void UpdateTextDirection(blink::WebTextDirection direction) override; | 133 void UpdateTextDirection(blink::WebTextDirection direction) override; |
| 134 void NotifyTextDirection() override; | 134 void NotifyTextDirection() override; |
| 135 void Focus() override; | 135 void Focus() override; |
| 136 void Blur() override; | 136 void Blur() override; |
| 137 void SetActive(bool active) override; | 137 void SetActive(bool active) override; |
| 138 void CopyFromBackingStore(const gfx::Rect& src_rect, | 138 void CopyFromBackingStore(const gfx::Rect& src_rect, |
| 139 const gfx::Size& accelerated_dst_size, | 139 const gfx::Size& accelerated_dst_size, |
| 140 ReadbackRequestCallback& callback, | 140 ReadbackRequestCallback& callback, |
| 141 const SkColorType color_type) override; | 141 const SkColorType preferred_color_type) override; |
| 142 bool CanCopyFromBackingStore() override; | 142 bool CanCopyFromBackingStore() override; |
| 143 #if defined(OS_ANDROID) | 143 #if defined(OS_ANDROID) |
| 144 void LockBackingStore() override; | 144 void LockBackingStore() override; |
| 145 void UnlockBackingStore() override; | 145 void UnlockBackingStore() override; |
| 146 #endif | 146 #endif |
| 147 void ForwardMouseEvent(const blink::WebMouseEvent& mouse_event) override; | 147 void ForwardMouseEvent(const blink::WebMouseEvent& mouse_event) override; |
| 148 void ForwardWheelEvent(const blink::WebMouseWheelEvent& wheel_event) override; | 148 void ForwardWheelEvent(const blink::WebMouseWheelEvent& wheel_event) override; |
| 149 void ForwardKeyboardEvent(const NativeWebKeyboardEvent& key_event) override; | 149 void ForwardKeyboardEvent(const NativeWebKeyboardEvent& key_event) override; |
| 150 RenderProcessHost* GetProcess() const override; | 150 RenderProcessHost* GetProcess() const override; |
| 151 int GetRoutingID() const override; | 151 int GetRoutingID() const override; |
| 152 RenderWidgetHostView* GetView() const override; | 152 RenderWidgetHostView* GetView() const override; |
| 153 bool IsLoading() const override; | 153 bool IsLoading() const override; |
| 154 bool IsRenderView() const override; | 154 bool IsRenderView() const override; |
| 155 void ResizeRectChanged(const gfx::Rect& new_rect) override; | 155 void ResizeRectChanged(const gfx::Rect& new_rect) override; |
| 156 void RestartHangMonitorTimeout() override; | 156 void RestartHangMonitorTimeout() override; |
| 157 void SetIgnoreInputEvents(bool ignore_input_events) override; | 157 void SetIgnoreInputEvents(bool ignore_input_events) override; |
| 158 void WasResized() override; | 158 void WasResized() override; |
| 159 void AddKeyPressEventCallback(const KeyPressEventCallback& callback) override; | 159 void AddKeyPressEventCallback(const KeyPressEventCallback& callback) override; |
| 160 void RemoveKeyPressEventCallback( | 160 void RemoveKeyPressEventCallback( |
| 161 const KeyPressEventCallback& callback) override; | 161 const KeyPressEventCallback& callback) override; |
| 162 void AddMouseEventCallback(const MouseEventCallback& callback) override; | 162 void AddMouseEventCallback(const MouseEventCallback& callback) override; |
| 163 void RemoveMouseEventCallback(const MouseEventCallback& callback) override; | 163 void RemoveMouseEventCallback(const MouseEventCallback& callback) override; |
| 164 void GetWebScreenInfo(blink::WebScreenInfo* result) override; | 164 void GetWebScreenInfo(blink::WebScreenInfo* result) override; |
| 165 | 165 |
| 166 SkColorType PreferredReadbackFormat() override; | |
| 167 | |
| 168 // Forces redraw in the renderer and when the update reaches the browser | 166 // Forces redraw in the renderer and when the update reaches the browser |
| 169 // grabs snapshot from the compositor. Returns PNG-encoded snapshot. | 167 // grabs snapshot from the compositor. Returns PNG-encoded snapshot. |
| 170 void GetSnapshotFromBrowser( | 168 void GetSnapshotFromBrowser( |
| 171 const base::Callback<void(const unsigned char*,size_t)> callback); | 169 const base::Callback<void(const unsigned char*,size_t)> callback); |
| 172 | 170 |
| 173 const NativeWebKeyboardEvent* GetLastKeyboardEvent() const; | 171 const NativeWebKeyboardEvent* GetLastKeyboardEvent() const; |
| 174 | 172 |
| 175 // Notification that the screen info has changed. | 173 // Notification that the screen info has changed. |
| 176 void NotifyScreenInfoChanged(); | 174 void NotifyScreenInfoChanged(); |
| 177 | 175 |
| (...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 851 bool is_focused_; | 849 bool is_focused_; |
| 852 | 850 |
| 853 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 851 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
| 854 | 852 |
| 855 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 853 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
| 856 }; | 854 }; |
| 857 | 855 |
| 858 } // namespace content | 856 } // namespace content |
| 859 | 857 |
| 860 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 858 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
| OLD | NEW |