| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_DRAG_DEST_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_DRAG_DEST_DELEGATE_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_WEB_DRAG_DEST_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_WEB_DRAG_DEST_DELEGATE_H_ |
| 7 | 7 |
| 8 #if defined(TOOLKIT_GTK) | 8 #if defined(TOOLKIT_GTK) |
| 9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
| 10 #endif // TOOLKIT_GTK | 10 #endif // TOOLKIT_GTK |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 #endif | 48 #endif |
| 49 | 49 |
| 50 #if defined(TOOLKIT_GTK) | 50 #if defined(TOOLKIT_GTK) |
| 51 // Returns the bookmark atom type. GTK and Views return different values here. | 51 // Returns the bookmark atom type. GTK and Views return different values here. |
| 52 virtual GdkAtom GetBookmarkTargetAtom() const = 0; | 52 virtual GdkAtom GetBookmarkTargetAtom() const = 0; |
| 53 | 53 |
| 54 // Called when WebDragDestkGtk detects that there's bookmark data in a | 54 // Called when WebDragDestkGtk detects that there's bookmark data in a |
| 55 // drag. Not every drag will trigger these. | 55 // drag. Not every drag will trigger these. |
| 56 virtual void OnReceiveDataFromGtk(GtkSelectionData* data) = 0; | 56 virtual void OnReceiveDataFromGtk(GtkSelectionData* data) = 0; |
| 57 virtual void OnReceiveProcessedData(const GURL& url, | 57 virtual void OnReceiveProcessedData(const GURL& url, |
| 58 const string16& title) = 0; | 58 const base::string16& title) = 0; |
| 59 #elif defined(USE_AURA) | 59 #elif defined(USE_AURA) |
| 60 // Called at the start of every drag to supply the data associated with the | 60 // Called at the start of every drag to supply the data associated with the |
| 61 // drag. | 61 // drag. |
| 62 virtual void OnReceiveDragData(const ui::OSExchangeData& data) = 0; | 62 virtual void OnReceiveDragData(const ui::OSExchangeData& data) = 0; |
| 63 #elif defined(OS_WIN) | 63 #elif defined(OS_WIN) |
| 64 // Allows the delegate to set data on the drag. If it doesn't want to set | 64 // Allows the delegate to set data on the drag. If it doesn't want to set |
| 65 // data, it should return false. | 65 // data, it should return false. |
| 66 virtual bool AddDragData(const DropData& drop_data, | 66 virtual bool AddDragData(const DropData& drop_data, |
| 67 ui::OSExchangeData* data) = 0; | 67 ui::OSExchangeData* data) = 0; |
| 68 #endif // TOOLKIT_GTK | 68 #endif // TOOLKIT_GTK |
| 69 | 69 |
| 70 virtual ~WebDragDestDelegate() {} | 70 virtual ~WebDragDestDelegate() {} |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 } // namespace content | 73 } // namespace content |
| 74 | 74 |
| 75 #endif // CONTENT_PUBLIC_BROWSER_WEB_DRAG_DEST_DELEGATE_H_ | 75 #endif // CONTENT_PUBLIC_BROWSER_WEB_DRAG_DEST_DELEGATE_H_ |
| OLD | NEW |