Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(399)

Side by Side Diff: content/browser/tab_contents/web_drag_dest_delegate.h

Issue 8429005: Tweak the WebDragDestDelegate to be useful for more than GTK. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: TOOLKIT_USES_GTK Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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_BROWSER_TAB_CONTENTS_WEB_DRAG_DEST_DELEGATE_GTK_H_ 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_WEB_DRAG_DEST_DELEGATE_H_
6 #define CONTENT_BROWSER_TAB_CONTENTS_WEB_DRAG_DEST_DELEGATE_GTK_H_ 6 #define CONTENT_BROWSER_TAB_CONTENTS_WEB_DRAG_DEST_DELEGATE_H_
7 #pragma once 7 #pragma once
8 8
9 #if defined(TOOLKIT_USES_GTK)
9 #include <gtk/gtk.h> 10 #include <gtk/gtk.h>
11 #endif // TOOLKIT_USES_GTK
10 12
11 #include "base/string16.h" 13 #include "base/string16.h"
12 #include "content/common/content_export.h" 14 #include "content/common/content_export.h"
13 15
14 class GURL; 16 class GURL;
15 class TabContents; 17 class TabContents;
16 18
17 namespace content { 19 namespace content {
18 20
19 // An optional delegate that listens for drags of bookmark data. 21 // An optional delegate that listens for drags of bookmark data.
20 class CONTENT_EXPORT WebDragDestDelegateGtk { 22 class CONTENT_EXPORT WebDragDestDelegate {
21 public: 23 public:
22 // Announces that a drag has started. It's valid that a drag starts, along 24 // 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 25 // with over/enter/leave/drop notifications without receiving any bookmark
24 // data. 26 // data.
25 virtual void DragInitialize(TabContents* contents) = 0; 27 virtual void DragInitialize(TabContents* contents) = 0;
26 28
29 // Notifications of drag progression.
30 virtual void OnDragOver() = 0;
31 virtual void OnDragEnter() = 0;
32 virtual void OnDrop() = 0;
33
34 #if defined(TOOLKIT_USES_GTK)
27 // Returns the bookmark atom type. GTK and Views return different values here. 35 // Returns the bookmark atom type. GTK and Views return different values here.
28 virtual GdkAtom GetBookmarkTargetAtom() const = 0; 36 virtual GdkAtom GetBookmarkTargetAtom() const = 0;
29 37
30 // Called when WebDragDestkGtk detects that there's bookmark data in a 38 // Called when WebDragDestkGtk detects that there's bookmark data in a
31 // drag. Not every drag will trigger these. 39 // drag. Not every drag will trigger these.
32 virtual void OnReceiveDataFromGtk(GtkSelectionData* data) = 0; 40 virtual void OnReceiveDataFromGtk(GtkSelectionData* data) = 0;
33 virtual void OnReceiveProcessedData(const GURL& url, 41 virtual void OnReceiveProcessedData(const GURL& url,
34 const string16& title) = 0; 42 const string16& title) = 0;
35 43 #endif // TOOLKIT_USES_GTK
36 // Notifications of drag progression.
37 virtual void OnDragOver() = 0;
38 virtual void OnDragEnter() = 0;
39 virtual void OnDrop() = 0;
40 44
41 // This should also clear any state kept about this drag. 45 // This should also clear any state kept about this drag.
42 virtual void OnDragLeave() = 0; 46 virtual void OnDragLeave() = 0;
43 47
44 virtual ~WebDragDestDelegateGtk() {} 48 virtual ~WebDragDestDelegate() {}
45 }; 49 };
46 50
47 } // namespace content 51 } // namespace content
48 52
49 #endif // CONTENT_BROWSER_TAB_CONTENTS_WEB_DRAG_DEST_DELEGATE_GTK_H_ 53 #endif // CONTENT_BROWSER_TAB_CONTENTS_WEB_DRAG_DEST_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/web_drag_bookmark_handler_gtk.h ('k') | content/browser/tab_contents/web_drag_dest_delegate_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698