summaryrefslogtreecommitdiff
path: root/chromium/content/public/browser/web_contents_view_delegate.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content/public/browser/web_contents_view_delegate.h')
-rw-r--r--chromium/content/public/browser/web_contents_view_delegate.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/chromium/content/public/browser/web_contents_view_delegate.h b/chromium/content/public/browser/web_contents_view_delegate.h
index e8ad82fab5a..73f65070c52 100644
--- a/chromium/content/public/browser/web_contents_view_delegate.h
+++ b/chromium/content/public/browser/web_contents_view_delegate.h
@@ -22,11 +22,25 @@ class RenderFrameHost;
class RenderWidgetHost;
class WebDragDestDelegate;
struct ContextMenuParams;
+struct DropData;
// This interface allows a client to extend the functionality of the
// WebContentsView implementation.
class CONTENT_EXPORT WebContentsViewDelegate {
public:
+ enum class DropCompletionResult {
+ // The drag and drop operation can continue normally.
+ kContinue,
+
+ // The drag and drop should be aborted. For example, the data in the
+ // drop does not comply with enterprise policies.
+ kAbort,
+ };
+
+ // Callback used with OnPerformDrop() method that is called once
+ // OnPerformDrop() completes.
+ using DropCompletionCallback = base::OnceCallback<void(DropCompletionResult)>;
+
virtual ~WebContentsViewDelegate();
// Returns the native window containing the WebContents, or nullptr if the
@@ -67,6 +81,11 @@ class CONTENT_EXPORT WebContentsViewDelegate {
RenderWidgetHost* render_widget_host,
bool is_popup);
#endif
+
+ // Performs the actions needed for a drop and then calls the completion
+ // callback once done.
+ virtual void OnPerformDrop(const DropData& drop_data,
+ DropCompletionCallback callback);
};
} // namespace content