| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2011 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_BROWSER_TAB_CONTENTS_WEB_DRAG_DEST_DELEGATE_GTK_H_ | |
| 6 #define CONTENT_BROWSER_TAB_CONTENTS_WEB_DRAG_DEST_DELEGATE_GTK_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include <gtk/gtk.h> | |
| 10 | |
| 11 #include "base/string16.h" | |
| 12 #include "content/common/content_export.h" | |
| 13 | |
| 14 class GURL; | |
| 15 class TabContents; | |
| 16 | |
| 17 namespace content { | |
| 18 | |
| 19 // An optional delegate that listens for drags of bookmark data. | |
| 20 class CONTENT_EXPORT WebDragDestDelegateGtk { | |
| 21 public: | |
| 22 // Announces that a drag has started. It's valid that a drag starts, along | |
| 23 // with over/enter/leave/drop notifications without receiving any bookmark | |
| 24 // data. | |
| 25 virtual void DragInitialize(TabContents* contents) = 0; | |
| 26 | |
| 27 // Returns the bookmark atom type. GTK and Views return different values here. | |
| 28 virtual GdkAtom GetBookmarkTargetAtom() const = 0; | |
| 29 | |
| 30 // Called when WebDragDestkGtk detects that there's bookmark data in a | |
| 31 // drag. Not every drag will trigger these. | |
| 32 virtual void OnReceiveDataFromGtk(GtkSelectionData* data) = 0; | |
| 33 virtual void OnReceiveProcessedData(const GURL& url, | |
| 34 const string16& title) = 0; | |
| 35 | |
| 36 // Notifications of drag progression. | |
| 37 virtual void OnDragOver() = 0; | |
| 38 virtual void OnDragEnter() = 0; | |
| 39 virtual void OnDrop() = 0; | |
| 40 | |
| 41 // This should also clear any state kept about this drag. | |
| 42 virtual void OnDragLeave() = 0; | |
| 43 | |
| 44 virtual ~WebDragDestDelegateGtk() {} | |
| 45 }; | |
| 46 | |
| 47 } // namespace content | |
| 48 | |
| 49 #endif // CONTENT_BROWSER_TAB_CONTENTS_WEB_DRAG_DEST_DELEGATE_GTK_H_ | |
| OLD | NEW |