| 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 void RemoveKeyPressEventCallback( | 167 void RemoveKeyPressEventCallback( |
| 168 const KeyPressEventCallback& callback) override; | 168 const KeyPressEventCallback& callback) override; |
| 169 void AddMouseEventCallback(const MouseEventCallback& callback) override; | 169 void AddMouseEventCallback(const MouseEventCallback& callback) override; |
| 170 void RemoveMouseEventCallback(const MouseEventCallback& callback) override; | 170 void RemoveMouseEventCallback(const MouseEventCallback& callback) override; |
| 171 void AddInputEventObserver( | 171 void AddInputEventObserver( |
| 172 RenderWidgetHost::InputEventObserver* observer) override; | 172 RenderWidgetHost::InputEventObserver* observer) override; |
| 173 void RemoveInputEventObserver( | 173 void RemoveInputEventObserver( |
| 174 RenderWidgetHost::InputEventObserver* observer) override; | 174 RenderWidgetHost::InputEventObserver* observer) override; |
| 175 void GetScreenInfo(content::ScreenInfo* result) override; | 175 void GetScreenInfo(content::ScreenInfo* result) override; |
| 176 void HandleCompositorProto(const std::vector<uint8_t>& proto) override; | 176 void HandleCompositorProto(const std::vector<uint8_t>& proto) override; |
| 177 // |drop_data| must have been filtered. The embedder should call |
| 178 // FilterDropData before passing the drop data to RWHI. |
| 179 void DragTargetDragEnter(const DropData& drop_data, |
| 180 const gfx::Point& client_pt, |
| 181 const gfx::Point& screen_pt, |
| 182 blink::WebDragOperationsMask operations_allowed, |
| 183 int key_modifiers) override; |
| 184 void DragTargetDragOver(const gfx::Point& client_pt, |
| 185 const gfx::Point& screen_pt, |
| 186 blink::WebDragOperationsMask operations_allowed, |
| 187 int key_modifiers) override; |
| 188 void DragTargetDragLeave() override; |
| 189 // |drop_data| must have been filtered. The embedder should call |
| 190 // FilterDropData before passing the drop data to RWHI. |
| 191 void DragTargetDrop(const DropData& drop_data, |
| 192 const gfx::Point& client_pt, |
| 193 const gfx::Point& screen_pt, |
| 194 int key_modifiers) override; |
| 177 | 195 |
| 178 // Notification that the screen info has changed. | 196 // Notification that the screen info has changed. |
| 179 void NotifyScreenInfoChanged(); | 197 void NotifyScreenInfoChanged(); |
| 180 | 198 |
| 181 // Forces redraw in the renderer and when the update reaches the browser | 199 // Forces redraw in the renderer and when the update reaches the browser |
| 182 // grabs snapshot from the compositor. Returns PNG-encoded snapshot. | 200 // grabs snapshot from the compositor. Returns PNG-encoded snapshot. |
| 183 using GetSnapshotFromBrowserCallback = | 201 using GetSnapshotFromBrowserCallback = |
| 184 base::Callback<void(const unsigned char*, size_t)>; | 202 base::Callback<void(const unsigned char*, size_t)>; |
| 185 void GetSnapshotFromBrowser(const GetSnapshotFromBrowserCallback& callback); | 203 void GetSnapshotFromBrowser(const GetSnapshotFromBrowserCallback& callback); |
| 186 | 204 |
| (...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 660 void WindowSnapshotReachedScreen(int snapshot_id); | 678 void WindowSnapshotReachedScreen(int snapshot_id); |
| 661 | 679 |
| 662 void OnSnapshotDataReceived(int snapshot_id, | 680 void OnSnapshotDataReceived(int snapshot_id, |
| 663 const unsigned char* png, | 681 const unsigned char* png, |
| 664 size_t size); | 682 size_t size); |
| 665 | 683 |
| 666 void OnSnapshotDataReceivedAsync( | 684 void OnSnapshotDataReceivedAsync( |
| 667 int snapshot_id, | 685 int snapshot_id, |
| 668 scoped_refptr<base::RefCountedBytes> png_data); | 686 scoped_refptr<base::RefCountedBytes> png_data); |
| 669 | 687 |
| 688 // 1. Grants permissions to URL (if any) |
| 689 // 2. Grants permissions to filenames |
| 690 // 3. Grants permissions to file system files. |
| 691 // 4. Register the files with the IsolatedContext. |
| 692 void GrantFileAccessFromDropData(DropData* drop_data); |
| 693 |
| 670 // true if a renderer has once been valid. We use this flag to display a sad | 694 // true if a renderer has once been valid. We use this flag to display a sad |
| 671 // tab only when we lose our renderer and not if a paint occurs during | 695 // tab only when we lose our renderer and not if a paint occurs during |
| 672 // initialization. | 696 // initialization. |
| 673 bool renderer_initialized_; | 697 bool renderer_initialized_; |
| 674 | 698 |
| 675 // True if |Destroy()| has been called. | 699 // True if |Destroy()| has been called. |
| 676 bool destroyed_; | 700 bool destroyed_; |
| 677 | 701 |
| 678 // Our delegate, which wants to know mainly about keyboard events. | 702 // Our delegate, which wants to know mainly about keyboard events. |
| 679 // It will remain non-NULL until DetachDelegate() is called. | 703 // It will remain non-NULL until DetachDelegate() is called. |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 862 #endif | 886 #endif |
| 863 | 887 |
| 864 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 888 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
| 865 | 889 |
| 866 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 890 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
| 867 }; | 891 }; |
| 868 | 892 |
| 869 } // namespace content | 893 } // namespace content |
| 870 | 894 |
| 871 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 895 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
| OLD | NEW |