OLD | NEW |
(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_TAB_CONTENTS_WEB_DRAG_BOOKMARK_HANDLER_AURA_H_ |
| 6 #define CHROME_BROWSER_TAB_CONTENTS_WEB_DRAG_BOOKMARK_HANDLER_AURA_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "content/public/browser/web_contents.h" |
| 10 #include "chrome/browser/bookmarks/bookmark_node_data.h" |
| 11 |
| 12 class TabContentsWrapper; |
| 13 |
| 14 // Chrome needs to intercept content drag events so it can dispatch them to the |
| 15 // bookmarks and extensions system. |
| 16 // Note that unlike the other platforms, Aura doesn't use the WebDragDest |
| 17 // infrastructure, so we don't implement WebDragDestDelegate here (although the |
| 18 // interface is really the same). |
| 19 class WebDragBookmarkHandlerAura { |
| 20 public: |
| 21 WebDragBookmarkHandlerAura(); |
| 22 virtual ~WebDragBookmarkHandlerAura(); |
| 23 |
| 24 void DragInitialize(content::WebContents* contents); |
| 25 void OnDragOver(); |
| 26 void OnDragEnter(const ui::OSExchangeData& data); |
| 27 void OnDrop(); |
| 28 void OnDragLeave(); |
| 29 |
| 30 private: |
| 31 // The TabContentsWrapper for the drag. |
| 32 // Weak reference; may be NULL if the contents aren't contained in a wrapper |
| 33 // (e.g. WebUI dialogs). |
| 34 TabContentsWrapper* tab_; |
| 35 |
| 36 // The bookmark data for the active drag. Empty when there is no active |
| 37 // drag. |
| 38 BookmarkNodeData bookmark_drag_data_; |
| 39 |
| 40 DISALLOW_COPY_AND_ASSIGN(WebDragBookmarkHandlerAura); |
| 41 }; |
| 42 |
| 43 #endif // CHROME_BROWSER_TAB_CONTENTS_WEB_DRAG_BOOKMARK_HANDLER_AURA_H_ |
OLD | NEW |