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

Side by Side Diff: chrome/browser/ui/gtk/tab_contents/web_drag_bookmark_handler_gtk.h

Issue 231733005: Delete the GTK+ port of Chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remerge to ToT Created 6 years, 8 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
(Empty)
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.
4
5 #ifndef CHROME_BROWSER_UI_GTK_TAB_CONTENTS_WEB_DRAG_BOOKMARK_HANDLER_GTK_H_
6 #define CHROME_BROWSER_UI_GTK_TAB_CONTENTS_WEB_DRAG_BOOKMARK_HANDLER_GTK_H_
7
8 #include "base/compiler_specific.h"
9 #include "chrome/browser/bookmarks/bookmark_node_data.h"
10 #include "content/public/browser/web_drag_dest_delegate.h"
11
12 class BookmarkTabHelper;
13
14 namespace content {
15 class WebContents;
16 }
17
18 // Chrome needs to intercept content drag events so it can dispatch them to the
19 // bookmarks and extensions system.
20 class WebDragBookmarkHandlerGtk : public content::WebDragDestDelegate {
21 public:
22 WebDragBookmarkHandlerGtk();
23 virtual ~WebDragBookmarkHandlerGtk();
24
25 // Overridden from content::WebDragDestDelegate:
26 virtual void DragInitialize(content::WebContents* contents) OVERRIDE;
27 virtual GdkAtom GetBookmarkTargetAtom() const OVERRIDE;
28 virtual void OnReceiveDataFromGtk(GtkSelectionData* data) OVERRIDE;
29 virtual void OnReceiveProcessedData(const GURL& url,
30 const base::string16& title) OVERRIDE;
31 virtual void OnDragOver() OVERRIDE;
32 virtual void OnDragEnter() OVERRIDE;
33 virtual void OnDrop() OVERRIDE;
34 virtual void OnDragLeave() OVERRIDE;
35
36 private:
37 // The BookmarkTabHelper.
38 // Weak reference; may be NULL if the contents don't have a
39 // BookmarkTabHelper (e.g. WebUI dialogs).
40 BookmarkTabHelper* bookmark_tab_helper_;
41
42 content::WebContents* web_contents_;
43
44 // The bookmark data for the current tab. This will be empty if there is not
45 // a native bookmark drag (or we haven't gotten the data from the source yet).
46 BookmarkNodeData bookmark_drag_data_;
47
48 DISALLOW_COPY_AND_ASSIGN(WebDragBookmarkHandlerGtk);
49 };
50
51 #endif // CHROME_BROWSER_UI_GTK_TAB_CONTENTS_WEB_DRAG_BOOKMARK_HANDLER_GTK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698