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

Unified Diff: ash/common/drag_drop/drag_image_view.h

Issue 2206033002: mash: Migrate ash::DragImageView to wm common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 years, 4 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
« no previous file with comments | « ash/common/drag_drop/OWNERS ('k') | ash/common/drag_drop/drag_image_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/drag_drop/drag_image_view.h
diff --git a/ash/drag_drop/drag_image_view.h b/ash/common/drag_drop/drag_image_view.h
similarity index 86%
rename from ash/drag_drop/drag_image_view.h
rename to ash/common/drag_drop/drag_image_view.h
index 8211c769d5faaead54d264e5dc5ffcae31053be0..63b972efccfb2c1f839afcf1bfc81f478ba5ffd5 100644
--- a/ash/drag_drop/drag_image_view.h
+++ b/ash/common/drag_drop/drag_image_view.h
@@ -2,13 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef ASH_DRAG_DROP_DRAG_IMAGE_VIEW_H_
-#define ASH_DRAG_DROP_DRAG_IMAGE_VIEW_H_
+#ifndef ASH_COMMON_DRAG_DROP_DRAG_IMAGE_VIEW_H_
+#define ASH_COMMON_DRAG_DROP_DRAG_IMAGE_VIEW_H_
#include <memory>
#include "base/macros.h"
#include "ui/base/dragdrop/drag_drop_types.h"
+#include "ui/gfx/geometry/point.h"
+#include "ui/gfx/geometry/size.h"
#include "ui/views/controls/image_view.h"
namespace gfx {
@@ -21,18 +23,19 @@ class Widget;
namespace ash {
+class WmWindow;
+
// This class allows to show a (native) view always on top of everything. It
// does this by creating a widget and setting the content as the given view. The
// caller can then use this object to freely move / drag it around on the
// desktop in screen coordinates.
class DragImageView : public views::ImageView {
public:
- // |context is the native view context used to create the widget holding the
- // drag image.
+ // |root_window| is the root window on which to create the drag image widget.
// |source| is the event source that started this drag drop operation (touch
// or mouse). It is used to determine attributes of the drag image such as
// whether to show drag operation hint on top of the image.
- DragImageView(gfx::NativeView context,
+ DragImageView(WmWindow* root_window,
ui::DragDropTypes::DragEventSource source);
~DragImageView() override;
@@ -77,6 +80,8 @@ class DragImageView : public views::ImageView {
gfx::Size widget_size_;
ui::DragDropTypes::DragEventSource drag_event_source_;
+
+ // Bitmask of ui::DragDropTypes::DragOperation values.
int touch_drag_operation_;
gfx::Point touch_drag_operation_indicator_position_;
@@ -85,4 +90,4 @@ class DragImageView : public views::ImageView {
} // namespace ash
-#endif // ASH_DRAG_DROP_DRAG_IMAGE_VIEW_H_
+#endif // ASH_COMMON_DRAG_DROP_DRAG_IMAGE_VIEW_H_
« no previous file with comments | « ash/common/drag_drop/OWNERS ('k') | ash/common/drag_drop/drag_image_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698