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
3 // found in the LICENSE file.
4 
5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_DRAG_DEST_DELEGATE_H_
6 #define CONTENT_PUBLIC_BROWSER_WEB_DRAG_DEST_DELEGATE_H_
7 
8 #include "base/strings/string16.h"
9 
10 namespace ui {
11 class OSExchangeData;
12 }
13 
14 namespace content {
15 class WebContents;
16 
17 // An optional delegate that listens for drags of bookmark data.
18 class WebDragDestDelegate {
19  public:
20   // Announces that a drag has started. It's valid that a drag starts, along
21   // with over/enter/leave/drop notifications without receiving any bookmark
22   // data.
23   virtual void DragInitialize(WebContents* contents) = 0;
24 
25   // Notifications of drag progression.
26   virtual void OnDragOver() = 0;
27   virtual void OnDragEnter() = 0;
28   virtual void OnDrop() = 0;
29   // This should also clear any state kept about this drag.
30   virtual void OnDragLeave() = 0;
31 
32 #if defined(USE_AURA)
33   // Called at the start of every drag to supply the data associated with the
34   // drag.
35   virtual void OnReceiveDragData(const ui::OSExchangeData& data) = 0;
36 #endif  // USE_AURA
37 
~WebDragDestDelegate()38   virtual ~WebDragDestDelegate() {}
39 };
40 
41 }  // namespace content
42 
43 #endif  // CONTENT_PUBLIC_BROWSER_WEB_DRAG_DEST_DELEGATE_H_
44