Index: chrome/browser/tab_contents/web_drag_bookmark_handler_aura.h |
diff --git a/chrome/browser/tab_contents/web_drag_bookmark_handler_aura.h b/chrome/browser/tab_contents/web_drag_bookmark_handler_aura.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1b1c0eb6f1489f8e4b3e9f7e2f6071aecfdd8351 |
--- /dev/null |
+++ b/chrome/browser/tab_contents/web_drag_bookmark_handler_aura.h |
@@ -0,0 +1,43 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_TAB_CONTENTS_WEB_DRAG_BOOKMARK_HANDLER_AURA_H_ |
+#define CHROME_BROWSER_TAB_CONTENTS_WEB_DRAG_BOOKMARK_HANDLER_AURA_H_ |
+#pragma once |
+ |
+#include "content/public/browser/web_contents.h" |
+#include "chrome/browser/bookmarks/bookmark_node_data.h" |
+ |
+class TabContentsWrapper; |
+ |
+// Chrome needs to intercept content drag events so it can dispatch them to the |
+// bookmarks and extensions system. |
+// Note that unlike the other platforms, Aura doesn't use the WebDragDest |
+// infrastructure, so we don't implement WebDragDestDelegate here (although the |
+// interface is really the same). |
+class WebDragBookmarkHandlerAura { |
+ public: |
+ WebDragBookmarkHandlerAura(); |
+ virtual ~WebDragBookmarkHandlerAura(); |
+ |
+ void DragInitialize(content::WebContents* contents); |
+ void OnDragOver(); |
+ void OnDragEnter(const ui::OSExchangeData& data); |
+ void OnDrop(); |
+ void OnDragLeave(); |
+ |
+ private: |
+ // The TabContentsWrapper for the drag. |
+ // Weak reference; may be NULL if the contents aren't contained in a wrapper |
+ // (e.g. WebUI dialogs). |
+ TabContentsWrapper* tab_; |
+ |
+ // The bookmark data for the active drag. Empty when there is no active |
+ // drag. |
+ BookmarkNodeData bookmark_drag_data_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(WebDragBookmarkHandlerAura); |
+}; |
+ |
+#endif // CHROME_BROWSER_TAB_CONTENTS_WEB_DRAG_BOOKMARK_HANDLER_AURA_H_ |