Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(665)

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.h

Issue 2485693003: Drag-and-drop: DragEnter, DragOver, DragLeave, DragDrop (Closed)
Patch Set: Addressed comments by dcheng@. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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;
195 void FilterDropData(DropData* drop_data) override;
177 196
178 // Notification that the screen info has changed. 197 // Notification that the screen info has changed.
179 void NotifyScreenInfoChanged(); 198 void NotifyScreenInfoChanged();
180 199
181 // Forces redraw in the renderer and when the update reaches the browser 200 // Forces redraw in the renderer and when the update reaches the browser
182 // grabs snapshot from the compositor. Returns PNG-encoded snapshot. 201 // grabs snapshot from the compositor. Returns PNG-encoded snapshot.
183 using GetSnapshotFromBrowserCallback = 202 using GetSnapshotFromBrowserCallback =
184 base::Callback<void(const unsigned char*, size_t)>; 203 base::Callback<void(const unsigned char*, size_t)>;
185 void GetSnapshotFromBrowser(const GetSnapshotFromBrowserCallback& callback); 204 void GetSnapshotFromBrowser(const GetSnapshotFromBrowserCallback& callback);
186 205
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 void WindowSnapshotReachedScreen(int snapshot_id); 679 void WindowSnapshotReachedScreen(int snapshot_id);
661 680
662 void OnSnapshotDataReceived(int snapshot_id, 681 void OnSnapshotDataReceived(int snapshot_id,
663 const unsigned char* png, 682 const unsigned char* png,
664 size_t size); 683 size_t size);
665 684
666 void OnSnapshotDataReceivedAsync( 685 void OnSnapshotDataReceivedAsync(
667 int snapshot_id, 686 int snapshot_id,
668 scoped_refptr<base::RefCountedBytes> png_data); 687 scoped_refptr<base::RefCountedBytes> png_data);
669 688
689 // 1. Grants permissions to URL (if any)
690 // 2. Grants permissions to filenames
691 // 3. Grants permissions to file system files.
692 // 4. Register the files with the IsolatedContext.
693 void GrantFileAccessFromDropData(DropData* drop_data);
694
670 // true if a renderer has once been valid. We use this flag to display a sad 695 // 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 696 // tab only when we lose our renderer and not if a paint occurs during
672 // initialization. 697 // initialization.
673 bool renderer_initialized_; 698 bool renderer_initialized_;
674 699
675 // True if |Destroy()| has been called. 700 // True if |Destroy()| has been called.
676 bool destroyed_; 701 bool destroyed_;
677 702
678 // Our delegate, which wants to know mainly about keyboard events. 703 // Our delegate, which wants to know mainly about keyboard events.
679 // It will remain non-NULL until DetachDelegate() is called. 704 // It will remain non-NULL until DetachDelegate() is called.
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 #endif 887 #endif
863 888
864 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; 889 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_;
865 890
866 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 891 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
867 }; 892 };
868 893
869 } // namespace content 894 } // namespace content
870 895
871 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 896 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698