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

Unified Diff: base/base_drop_target.h

Issue 5009: Fix some issues found looking at the code.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 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 side-by-side diff with in-line comments
Download patch
Index: base/base_drop_target.h
===================================================================
--- base/base_drop_target.h (revision 2670)
+++ base/base_drop_target.h (working copy)
@@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BASE_BASE_DROP_TARGET_H__
-#define BASE_BASE_DROP_TARGET_H__
+#ifndef BASE_BASE_DROP_TARGET_H_
+#define BASE_BASE_DROP_TARGET_H_
-#include <atlbase.h>
#include <objidl.h>
-#include <shobjidl.h>
-#include "base/basictypes.h"
+#include "base/ref_counted.h"
+struct IDropTargetHelper;
+
// A DropTarget implementation that takes care of the nitty gritty
// of dnd. While this class is concrete, subclasses will most likely
// want to override various OnXXX methods.
@@ -18,6 +18,8 @@
// Because BaseDropTarget is ref counted you shouldn't delete it directly,
// rather wrap it in a scoped_refptr. Be sure and invoke RevokeDragDrop(m_hWnd)
// before the HWND is deleted too.
+//
+// This class is meant to be used in a STA and is not multithread-safe.
Dean McNamee 2008/09/30 20:47:26 an STA, I think
class BaseDropTarget : public IDropTarget {
public:
// Create a new BaseDropTarget associating it with the given HWND.
@@ -89,7 +91,7 @@
static IDropTargetHelper* DropHelper();
// The data object currently being dragged over this drop target.
- CComPtr<IDataObject> current_data_object_;
+ scoped_refptr<IDataObject> current_data_object_;
// A helper object that is used to provide drag image support while the mouse
// is dragging over the content area.
@@ -114,5 +116,4 @@
DISALLOW_EVIL_CONSTRUCTORS(BaseDropTarget);
};
-#endif // BASE_BASE_DROP_TARGET_H__
-
+#endif // BASE_BASE_DROP_TARGET_H_
« no previous file with comments | « base/base_drag_source.cc ('k') | base/base_drop_target.cc » ('j') | base/base_drop_target.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698