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

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

Issue 10945010: Switch BookmarkTabHelper to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 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_MAC_H_ 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_WEB_DRAG_BOOKMARK_HANDLER_MAC_H_
6 #define CHROME_BROWSER_TAB_CONTENTS_WEB_DRAG_BOOKMARK_HANDLER_MAC_H_ 6 #define CHROME_BROWSER_TAB_CONTENTS_WEB_DRAG_BOOKMARK_HANDLER_MAC_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "chrome/browser/bookmarks/bookmark_node_data.h" 9 #include "chrome/browser/bookmarks/bookmark_node_data.h"
10 #include "content/public/browser/web_drag_dest_delegate.h" 10 #include "content/public/browser/web_drag_dest_delegate.h"
11 11
12 class TabContents; 12 class BookmarkTabHelper;
13
14 namespace content {
15 class WebContents;
16 }
13 17
14 // Chrome needs to intercept content drag events so it can dispatch them to the 18 // Chrome needs to intercept content drag events so it can dispatch them to the
15 // bookmarks and extensions system. 19 // bookmarks and extensions system.
16 class WebDragBookmarkHandlerMac : public content::WebDragDestDelegate { 20 class WebDragBookmarkHandlerMac : public content::WebDragDestDelegate {
17 public: 21 public:
18 WebDragBookmarkHandlerMac(); 22 WebDragBookmarkHandlerMac();
19 virtual ~WebDragBookmarkHandlerMac(); 23 virtual ~WebDragBookmarkHandlerMac();
20 24
21 // Overridden from content::WebDragDestDelegate: 25 // Overridden from content::WebDragDestDelegate:
22 virtual void DragInitialize(content::WebContents* contents) OVERRIDE; 26 virtual void DragInitialize(content::WebContents* contents) OVERRIDE;
23 virtual void OnDragOver() OVERRIDE; 27 virtual void OnDragOver() OVERRIDE;
24 virtual void OnDragEnter() OVERRIDE; 28 virtual void OnDragEnter() OVERRIDE;
25 virtual void OnDrop() OVERRIDE; 29 virtual void OnDrop() OVERRIDE;
26 virtual void OnDragLeave() OVERRIDE; 30 virtual void OnDragLeave() OVERRIDE;
27 31
28 private: 32 private:
29 // The TabContents. 33 // The BookmarkTabHelper.
30 // Weak reference; may be NULL if the contents aren't contained in a 34 // Weak reference; may be NULL if the contents don't have a
31 // TabContents (e.g. WebUI dialogs). 35 // BookmarkTabHelper (e.g. WebUI dialogs).
32 TabContents* tab_; 36 BookmarkTabHelper* bookmark_tab_helper_;
37
38 content::WebContents* web_contents_;
33 39
34 // The bookmark data for the current tab. This will be empty if there is not 40 // The bookmark data for the current tab. This will be empty if there is not
35 // a native bookmark drag. 41 // a native bookmark drag.
36 BookmarkNodeData bookmark_drag_data_; 42 BookmarkNodeData bookmark_drag_data_;
37 43
38 DISALLOW_COPY_AND_ASSIGN(WebDragBookmarkHandlerMac); 44 DISALLOW_COPY_AND_ASSIGN(WebDragBookmarkHandlerMac);
39 }; 45 };
40 46
41 #endif // CHROME_BROWSER_TAB_CONTENTS_WEB_DRAG_BOOKMARK_HANDLER_MAC_H_ 47 #endif // CHROME_BROWSER_TAB_CONTENTS_WEB_DRAG_BOOKMARK_HANDLER_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698