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

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

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

Powered by Google App Engine
This is Rietveld 408576698