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