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

Unified Diff: services/ui/ws/server_window.h

Issue 2266603002: mus: Implement interwindow drag and drop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sky comments Created 4 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: services/ui/ws/server_window.h
diff --git a/services/ui/ws/server_window.h b/services/ui/ws/server_window.h
index 29b770ed1a77c48b07889289487feecd118e0675..69e31bd4d59e48b4a42a1e4e7345102d33a8ba7d 100644
--- a/services/ui/ws/server_window.h
+++ b/services/ui/ws/server_window.h
@@ -86,6 +86,9 @@ class ServerWindow {
void SetHitTestMask(const gfx::Rect& mask);
void ClearHitTestMask();
+ bool can_accept_drops() const { return accepts_drops_; }
+ void SetCanAcceptDrops(bool accepts_drags);
+
int32_t cursor() const { return static_cast<int32_t>(cursor_id_); }
int32_t non_client_cursor() const {
return static_cast<int32_t>(non_client_cursor_id_);
@@ -241,6 +244,10 @@ class ServerWindow {
// means all events miss the window. If null there is no mask.
std::unique_ptr<gfx::Rect> hit_test_mask_;
+ // Whether this window can be the target in a drag and drop
+ // operation. Clients must opt-in to this.
+ bool accepts_drops_ = false;
+
base::ObserverList<ServerWindowObserver> observers_;
DISALLOW_COPY_AND_ASSIGN(ServerWindow);

Powered by Google App Engine
This is Rietveld 408576698