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

Unified Diff: chrome/browser/tab_contents/web_drag_bookmark_handler_mac.h

Issue 8430013: Split Mac WebDropTarget into two, content and chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed commented out code Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/tab_contents/web_drag_bookmark_handler_mac.h
diff --git a/chrome/browser/tab_contents/web_drag_bookmark_handler_mac.h b/chrome/browser/tab_contents/web_drag_bookmark_handler_mac.h
new file mode 100644
index 0000000000000000000000000000000000000000..612fd0af178371eaf00a5a5c1af760dfd801e58b
--- /dev/null
+++ b/chrome/browser/tab_contents/web_drag_bookmark_handler_mac.h
@@ -0,0 +1,40 @@
+// Copyright (c) 2011 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_MAC_H_
+#define CHROME_BROWSER_TAB_CONTENTS_WEB_DRAG_BOOKMARK_HANDLER_MAC_H_
+#pragma once
+
+#include "base/compiler_specific.h"
+#include "chrome/browser/bookmarks/bookmark_node_data.h"
+#include "content/browser/tab_contents/web_drag_dest_delegate.h"
+
+class TabContentsWrapper;
+
+// Chrome needs to intercept content drag events so it can dispatch them to the
+// bookmarks and extensions system.
+class WebDragBookmarkHandlerMac : public content::WebDragDestDelegate {
+ public:
+ WebDragBookmarkHandlerMac();
+ virtual ~WebDragBookmarkHandlerMac();
+
+ // Overridden from WebDragBookmarkDelegate:
jochen (gone - plz use gerrit) 2011/11/01 15:16:07 from WebDragDestDelegate?
Avi (use Gerrit) 2011/11/01 16:01:06 sigh. fixing everywhere.
+ virtual void DragInitialize(TabContents* contents) OVERRIDE;
+ virtual void OnDragOver() OVERRIDE;
+ virtual void OnDragEnter() OVERRIDE;
+ virtual void OnDrop() OVERRIDE;
+ virtual void OnDragLeave() OVERRIDE;
+
+ private:
+ // The TabContentsWrapper for |tab_contents_|.
+ // 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 current tab. This will be empty if there is not
+ // a native bookmark drag.
+ BookmarkNodeData bookmark_drag_data_;
+};
jochen (gone - plz use gerrit) 2011/11/01 15:16:07 disallow copy & assign?
Avi (use Gerrit) 2011/11/01 16:01:06 yep.
+
+#endif // CHROME_BROWSER_TAB_CONTENTS_WEB_DRAG_BOOKMARK_HANDLER_MAC_H_

Powered by Google App Engine
This is Rietveld 408576698