Chromium Code Reviews| 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 119 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 a gfx::Image that is backed |
| 210 // by an NSImage on MacOS or by an SkBitmap otherwise. The gfx::Image may be | |
|
Avi (use Gerrit)
2017/01/09 16:57:33
Why are we doing things differently on the Mac tha
Eric Seckler
2017/01/11 15:58:44
Everywhere but on Mac, we're grabbing from cc laye
Avi (use Gerrit)
2017/01/11 17:09:20
Can we have some kind of note in the code? It's al
Eric Seckler
2017/01/20 09:22:12
Added a comment here. As I understand it, Mac is s
| |
| 211 // empty if the snapshot failed. | |
| 213 using GetSnapshotFromBrowserCallback = | 212 using GetSnapshotFromBrowserCallback = |
| 214 base::Callback<void(const unsigned char*, size_t)>; | 213 base::Callback<void(const gfx::Image&)>; |
| 215 void GetSnapshotFromBrowser(const GetSnapshotFromBrowserCallback& callback); | 214 void GetSnapshotFromBrowser(const GetSnapshotFromBrowserCallback& callback); |
| 216 | 215 |
| 217 const NativeWebKeyboardEvent* GetLastKeyboardEvent() const; | 216 const NativeWebKeyboardEvent* GetLastKeyboardEvent() const; |
| 218 | 217 |
| 219 // Sets the View of this RenderWidgetHost. | 218 // Sets the View of this RenderWidgetHost. |
| 220 void SetView(RenderWidgetHostViewBase* view); | 219 void SetView(RenderWidgetHostViewBase* view); |
| 221 | 220 |
| 222 RenderWidgetHostDelegate* delegate() const { return delegate_; } | 221 RenderWidgetHostDelegate* delegate() const { return delegate_; } |
| 223 | 222 |
| 224 bool empty() const { return current_size_.IsEmpty(); } | 223 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; | 692 void OnUnexpectedEventAck(UnexpectedEventAckType type) override; |
| 694 | 693 |
| 695 void OnSyntheticGestureCompleted(SyntheticGesture::Result result); | 694 void OnSyntheticGestureCompleted(SyntheticGesture::Result result); |
| 696 | 695 |
| 697 // Called when there is a new auto resize (using a post to avoid a stack | 696 // Called when there is a new auto resize (using a post to avoid a stack |
| 698 // which may get in recursive loops). | 697 // which may get in recursive loops). |
| 699 void DelayedAutoResized(); | 698 void DelayedAutoResized(); |
| 700 | 699 |
| 701 void WindowSnapshotReachedScreen(int snapshot_id); | 700 void WindowSnapshotReachedScreen(int snapshot_id); |
| 702 | 701 |
| 703 void OnSnapshotDataReceived(int snapshot_id, | 702 void OnSnapshotReceived(int snapshot_id, const gfx::Image& image); |
| 704 const unsigned char* png, | |
| 705 size_t size); | |
| 706 | |
| 707 void OnSnapshotDataReceivedAsync( | |
| 708 int snapshot_id, | |
| 709 scoped_refptr<base::RefCountedBytes> png_data); | |
| 710 | 703 |
| 711 // 1. Grants permissions to URL (if any) | 704 // 1. Grants permissions to URL (if any) |
| 712 // 2. Grants permissions to filenames | 705 // 2. Grants permissions to filenames |
| 713 // 3. Grants permissions to file system files. | 706 // 3. Grants permissions to file system files. |
| 714 // 4. Register the files with the IsolatedContext. | 707 // 4. Register the files with the IsolatedContext. |
| 715 void GrantFileAccessFromDropData(DropData* drop_data); | 708 void GrantFileAccessFromDropData(DropData* drop_data); |
| 716 | 709 |
| 717 // true if a renderer has once been valid. We use this flag to display a sad | 710 // 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 | 711 // tab only when we lose our renderer and not if a paint occurs during |
| 719 // initialization. | 712 // initialization. |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 907 #endif | 900 #endif |
| 908 | 901 |
| 909 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 902 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
| 910 | 903 |
| 911 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 904 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
| 912 }; | 905 }; |
| 913 | 906 |
| 914 } // namespace content | 907 } // namespace content |
| 915 | 908 |
| 916 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 909 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
| OLD | NEW |