BookmarkManager: Fix 'new folder text field size changes on clicking it' issue.
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / tab_contents / web_drag_bookmark_handler_mac.h
blob38428f54ed512cb6e05614e8f47656ec5e02af6b
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.
5 #ifndef CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_WEB_DRAG_BOOKMARK_HANDLER_MAC_H_
6 #define CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_WEB_DRAG_BOOKMARK_HANDLER_MAC_H_
8 #include "base/compiler_specific.h"
9 #include "components/bookmarks/browser/bookmark_node_data.h"
10 #include "content/public/browser/web_drag_dest_delegate.h"
12 class BookmarkTabHelper;
14 namespace content {
15 class WebContents;
18 // Chrome needs to intercept content drag events so it can dispatch them to the
19 // bookmarks and extensions system.
20 class WebDragBookmarkHandlerMac : public content::WebDragDestDelegate {
21 public:
22 WebDragBookmarkHandlerMac();
23 ~WebDragBookmarkHandlerMac() override;
25 // Overridden from content::WebDragDestDelegate:
26 void DragInitialize(content::WebContents* contents) override;
27 void OnDragOver() override;
28 void OnDragEnter() override;
29 void OnDrop() override;
30 void OnDragLeave() override;
32 private:
33 // The BookmarkTabHelper.
34 // Weak reference; may be NULL if the contents don't have a
35 // BookmarkTabHelper (e.g. WebUI dialogs).
36 BookmarkTabHelper* bookmark_tab_helper_;
38 content::WebContents* web_contents_;
40 // The bookmark data for the current tab. This will be empty if there is not
41 // a native bookmark drag.
42 bookmarks::BookmarkNodeData bookmark_drag_data_;
44 DISALLOW_COPY_AND_ASSIGN(WebDragBookmarkHandlerMac);
47 #endif // CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_WEB_DRAG_BOOKMARK_HANDLER_MAC_H_