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

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

Issue 9581003: Get rid of chrome dependencies from tab_contents_drag_win.cc. After this I'll move it to content\br… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 months 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_H_ 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_WEB_DRAG_DEST_DELEGATE_H_
6 #define CONTENT_BROWSER_TAB_CONTENTS_WEB_DRAG_DEST_DELEGATE_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 #if defined(TOOLKIT_USES_GTK)
10 #include <gtk/gtk.h> 10 #include <gtk/gtk.h>
11 #endif // TOOLKIT_USES_GTK 11 #endif // TOOLKIT_USES_GTK
12 12
13 #include "base/string16.h" 13 #include "base/string16.h"
14 14
15 #if defined(OS_WIN) 15 #if defined(OS_WIN)
16 #include "ui/base/dragdrop/drop_target.h" 16 #include "ui/base/dragdrop/drop_target.h"
17 #endif 17 #endif
18 18
19 class GURL; 19 class GURL;
20 struct WebDropData;
21
22 namespace ui {
23 class OSExchangeData;
24 }
20 25
21 namespace content { 26 namespace content {
22 27
23 class WebContents; 28 class WebContents;
24 29
25 // An optional delegate that listens for drags of bookmark data. 30 // An optional delegate that listens for drags of bookmark data.
26 class WebDragDestDelegate { 31 class WebDragDestDelegate {
27 public: 32 public:
28 // Announces that a drag has started. It's valid that a drag starts, along 33 // Announces that a drag has started. It's valid that a drag starts, along
29 // with over/enter/leave/drop notifications without receiving any bookmark 34 // with over/enter/leave/drop notifications without receiving any bookmark
(...skipping 16 matching lines...) Expand all
46 51
47 #if defined(TOOLKIT_USES_GTK) 52 #if defined(TOOLKIT_USES_GTK)
48 // Returns the bookmark atom type. GTK and Views return different values here. 53 // Returns the bookmark atom type. GTK and Views return different values here.
49 virtual GdkAtom GetBookmarkTargetAtom() const = 0; 54 virtual GdkAtom GetBookmarkTargetAtom() const = 0;
50 55
51 // Called when WebDragDestkGtk detects that there's bookmark data in a 56 // Called when WebDragDestkGtk detects that there's bookmark data in a
52 // drag. Not every drag will trigger these. 57 // drag. Not every drag will trigger these.
53 virtual void OnReceiveDataFromGtk(GtkSelectionData* data) = 0; 58 virtual void OnReceiveDataFromGtk(GtkSelectionData* data) = 0;
54 virtual void OnReceiveProcessedData(const GURL& url, 59 virtual void OnReceiveProcessedData(const GURL& url,
55 const string16& title) = 0; 60 const string16& title) = 0;
61 #elif defined(OS_WIN)
62 // Allows the delegate to set data on the drag. If it doesn't want to set
63 // data, it should return false.
64 virtual bool AddDragData(const WebDropData& drop_data,
65 ui::OSExchangeData* data) = 0;
56 #endif // TOOLKIT_USES_GTK 66 #endif // TOOLKIT_USES_GTK
57 67
58 virtual ~WebDragDestDelegate() {} 68 virtual ~WebDragDestDelegate() {}
59 }; 69 };
60 70
61 } // namespace content 71 } // namespace content
62 72
63 #endif // CONTENT_BROWSER_TAB_CONTENTS_WEB_DRAG_DEST_DELEGATE_H_ 73 #endif // CONTENT_BROWSER_TAB_CONTENTS_WEB_DRAG_DEST_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698