Popular sites on the NTP: Try to keep the ordering constant
[chromium-blink-merge.git] / content / public / browser / web_drag_dest_delegate.h
blob0f13c947800f0263de76d0073d0c3b20a6932c54
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.
5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_DRAG_DEST_DELEGATE_H_
6 #define CONTENT_PUBLIC_BROWSER_WEB_DRAG_DEST_DELEGATE_H_
8 #include "base/strings/string16.h"
10 class GURL;
12 namespace ui {
13 class OSExchangeData;
16 namespace content {
17 class WebContents;
18 struct DropData;
20 // An optional delegate that listens for drags of bookmark data.
21 class WebDragDestDelegate {
22 public:
23 // Announces that a drag has started. It's valid that a drag starts, along
24 // with over/enter/leave/drop notifications without receiving any bookmark
25 // data.
26 virtual void DragInitialize(WebContents* contents) = 0;
28 // Notifications of drag progression.
29 virtual void OnDragOver() = 0;
30 virtual void OnDragEnter() = 0;
31 virtual void OnDrop() = 0;
32 // This should also clear any state kept about this drag.
33 virtual void OnDragLeave() = 0;
35 #if defined(USE_AURA)
36 // Called at the start of every drag to supply the data associated with the
37 // drag.
38 virtual void OnReceiveDragData(const ui::OSExchangeData& data) = 0;
39 #endif // USE_AURA
41 virtual ~WebDragDestDelegate() {}
44 } // namespace content
46 #endif // CONTENT_PUBLIC_BROWSER_WEB_DRAG_DEST_DELEGATE_H_