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

Unified Diff: content/renderer/render_widget.h

Issue 2485693003: Drag-and-drop: DragEnter, DragOver, DragLeave, DragDrop (Closed)
Patch Set: No longer using GetSiteInstance() in RenderWidgetHostImpl. 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/render_widget.h
diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h
index 8962e31a6e59fafd25b5dd47fba47a67540be4c0..db49bf33f1cf7753bb2acea8f11eeb9b185dd8be 100644
--- a/content/renderer/render_widget.h
+++ b/content/renderer/render_widget.h
@@ -25,6 +25,7 @@
#include "content/common/drag_event_source_info.h"
#include "content/common/edit_command.h"
#include "content/common/input/synthetic_gesture_params.h"
+#include "content/public/common/drop_data.h"
#include "content/public/common/screen_info.h"
#include "content/renderer/devtools/render_widget_screen_metrics_emulator_delegate.h"
#include "content/renderer/gpu/render_widget_compositor_delegate.h"
@@ -404,6 +405,9 @@ class CONTENT_EXPORT RenderWidget
// When emulated, this returns original device scale factor.
float GetOriginalDeviceScaleFactor() const;
+ // Helper to convert |point| using ConvertWindowToViewport().
+ gfx::Point ConvertWindowPointToViewport(const gfx::Point& point);
+
protected:
// Friend RefCounted so that the dtor can be non-public. Using this class
// without ref-counting is an error.
@@ -507,6 +511,22 @@ class CONTENT_EXPORT RenderWidget
void OnUpdateWindowScreenRect(const gfx::Rect& window_screen_rect);
void OnSetFrameSinkId(const cc::FrameSinkId& frame_sink_id);
void OnHandleCompositorProto(const std::vector<uint8_t>& proto);
+ // Real data that is dragged is not included at DragEnter time.
+ void OnDragTargetDragEnter(
+ const std::vector<DropData::Metadata>& drop_meta_data,
+ const gfx::Point& client_pt,
+ const gfx::Point& screen_pt,
+ blink::WebDragOperationsMask operations_allowed,
+ int key_modifiers);
+ void OnDragTargetDragOver(const gfx::Point& client_pt,
+ const gfx::Point& screen_pt,
+ blink::WebDragOperationsMask operations_allowed,
+ int key_modifiers);
+ void OnDragTargetDragLeave();
+ void OnDragTargetDrop(const DropData& drop_data,
+ const gfx::Point& client_pt,
+ const gfx::Point& screen_pt,
+ int key_modifiers);
#if defined(OS_ANDROID)
// Called when we send IME event that expects an ACK.

Powered by Google App Engine
This is Rietveld 408576698