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

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: Rebased. More fixes. 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 22 matching lines...) Expand all
33 #include "content/browser/renderer_host/input/touch_emulator_client.h" 33 #include "content/browser/renderer_host/input/touch_emulator_client.h"
34 #include "content/browser/renderer_host/render_widget_host_delegate.h" 34 #include "content/browser/renderer_host/render_widget_host_delegate.h"
35 #include "content/browser/renderer_host/render_widget_host_view_base.h" 35 #include "content/browser/renderer_host/render_widget_host_view_base.h"
36 #include "content/common/drag_event_source_info.h" 36 #include "content/common/drag_event_source_info.h"
37 #include "content/common/input/input_event_ack_state.h" 37 #include "content/common/input/input_event_ack_state.h"
38 #include "content/common/input/synthetic_gesture_packet.h" 38 #include "content/common/input/synthetic_gesture_packet.h"
39 #include "content/common/view_message_enums.h" 39 #include "content/common/view_message_enums.h"
40 #include "content/public/browser/readback_types.h" 40 #include "content/public/browser/readback_types.h"
41 #include "content/public/browser/render_widget_host.h" 41 #include "content/public/browser/render_widget_host.h"
42 #include "content/public/common/page_zoom.h" 42 #include "content/public/common/page_zoom.h"
43 #include "content/public/common/url_constants.h"
43 #include "ipc/ipc_listener.h" 44 #include "ipc/ipc_listener.h"
44 #include "third_party/WebKit/public/platform/WebDisplayMode.h" 45 #include "third_party/WebKit/public/platform/WebDisplayMode.h"
45 #include "ui/base/ime/text_input_mode.h" 46 #include "ui/base/ime/text_input_mode.h"
46 #include "ui/base/ime/text_input_type.h" 47 #include "ui/base/ime/text_input_type.h"
47 #include "ui/events/gesture_detection/gesture_provider_config_helper.h" 48 #include "ui/events/gesture_detection/gesture_provider_config_helper.h"
48 #include "ui/events/latency_info.h" 49 #include "ui/events/latency_info.h"
49 #include "ui/gfx/native_widget_types.h" 50 #include "ui/gfx/native_widget_types.h"
50 51
51 struct FrameHostMsg_HittestData_Params; 52 struct FrameHostMsg_HittestData_Params;
52 struct ViewHostMsg_SelectionBounds_Params; 53 struct ViewHostMsg_SelectionBounds_Params;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 void RemoveKeyPressEventCallback( 168 void RemoveKeyPressEventCallback(
168 const KeyPressEventCallback& callback) override; 169 const KeyPressEventCallback& callback) override;
169 void AddMouseEventCallback(const MouseEventCallback& callback) override; 170 void AddMouseEventCallback(const MouseEventCallback& callback) override;
170 void RemoveMouseEventCallback(const MouseEventCallback& callback) override; 171 void RemoveMouseEventCallback(const MouseEventCallback& callback) override;
171 void AddInputEventObserver( 172 void AddInputEventObserver(
172 RenderWidgetHost::InputEventObserver* observer) override; 173 RenderWidgetHost::InputEventObserver* observer) override;
173 void RemoveInputEventObserver( 174 void RemoveInputEventObserver(
174 RenderWidgetHost::InputEventObserver* observer) override; 175 RenderWidgetHost::InputEventObserver* observer) override;
175 void GetScreenInfo(content::ScreenInfo* result) override; 176 void GetScreenInfo(content::ScreenInfo* result) override;
176 void HandleCompositorProto(const std::vector<uint8_t>& proto) override; 177 void HandleCompositorProto(const std::vector<uint8_t>& proto) override;
178 // |drop_data| must have been filtered. The embedder should call
179 // FilterDropData before passing the drop data to RWHI.
180 void DragTargetDragEnter(const DropData& drop_data,
181 const gfx::Point& client_pt,
182 const gfx::Point& screen_pt,
183 blink::WebDragOperationsMask operations_allowed,
184 int key_modifiers) override;
185 void DragTargetDragEnterWithMetaData(
186 const std::vector<DropData::Metadata>& metadata,
187 const gfx::Point& client_pt,
188 const gfx::Point& screen_pt,
189 blink::WebDragOperationsMask operations_allowed,
190 int key_modifiers) override;
191 void DragTargetDragOver(const gfx::Point& client_pt,
192 const gfx::Point& screen_pt,
193 blink::WebDragOperationsMask operations_allowed,
194 int key_modifiers) override;
195 void DragTargetDragLeave() override;
196 // |drop_data| must have been filtered. The embedder should call
197 // FilterDropData before passing the drop data to RWHI.
198 void DragTargetDrop(const DropData& drop_data,
199 const gfx::Point& client_pt,
200 const gfx::Point& screen_pt,
201 int key_modifiers) override;
202 void FilterDropData(DropData* drop_data) override;
177 203
178 // Notification that the screen info has changed. 204 // Notification that the screen info has changed.
179 void NotifyScreenInfoChanged(); 205 void NotifyScreenInfoChanged();
180 206
181 // 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
182 // grabs snapshot from the compositor. Returns PNG-encoded snapshot. 208 // grabs snapshot from the compositor. Returns PNG-encoded snapshot.
183 using GetSnapshotFromBrowserCallback = 209 using GetSnapshotFromBrowserCallback =
184 base::Callback<void(const unsigned char*, size_t)>; 210 base::Callback<void(const unsigned char*, size_t)>;
185 void GetSnapshotFromBrowser(const GetSnapshotFromBrowserCallback& callback); 211 void GetSnapshotFromBrowser(const GetSnapshotFromBrowserCallback& callback);
186 212
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 void WindowSnapshotReachedScreen(int snapshot_id); 686 void WindowSnapshotReachedScreen(int snapshot_id);
661 687
662 void OnSnapshotDataReceived(int snapshot_id, 688 void OnSnapshotDataReceived(int snapshot_id,
663 const unsigned char* png, 689 const unsigned char* png,
664 size_t size); 690 size_t size);
665 691
666 void OnSnapshotDataReceivedAsync( 692 void OnSnapshotDataReceivedAsync(
667 int snapshot_id, 693 int snapshot_id,
668 scoped_refptr<base::RefCountedBytes> png_data); 694 scoped_refptr<base::RefCountedBytes> png_data);
669 695
696 // 1. Grants permissions to URL (if any)
697 // 2. Grants permissions to filenames
698 // 3. Grants permissions to file system files.
699 // 4. Register the files with the IsolatedContext.
700 void GrantFileAccessFromDropData(DropData* drop_data);
701
670 // true if a renderer has once been valid. We use this flag to display a sad 702 // 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 703 // tab only when we lose our renderer and not if a paint occurs during
672 // initialization. 704 // initialization.
673 bool renderer_initialized_; 705 bool renderer_initialized_;
674 706
675 // True if |Destroy()| has been called. 707 // True if |Destroy()| has been called.
676 bool destroyed_; 708 bool destroyed_;
677 709
678 // Our delegate, which wants to know mainly about keyboard events. 710 // Our delegate, which wants to know mainly about keyboard events.
679 // It will remain non-NULL until DetachDelegate() is called. 711 // It will remain non-NULL until DetachDelegate() is called.
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 #endif 892 #endif
861 893
862 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; 894 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_;
863 895
864 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 896 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
865 }; 897 };
866 898
867 } // namespace content 899 } // namespace content
868 900
869 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 901 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host_unittest.cc ('k') | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698