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

Unified Diff: services/ui/public/cpp/window.cc

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/public/cpp/window.cc
diff --git a/services/ui/public/cpp/window.cc b/services/ui/public/cpp/window.cc
index f7d32f72abfa1adbb791d7e89b9c5591869160de..731a773e410d13815e0355275eb52b695ff7c156 100644
--- a/services/ui/public/cpp/window.cc
+++ b/services/ui/public/cpp/window.cc
@@ -447,6 +447,14 @@ void Window::SetCanFocus(bool can_focus) {
client_->SetCanFocus(server_id_, can_focus);
}
+void Window::SetCanAcceptDrops(WindowDropTarget* drop_target) {
+ if (drop_target_ == drop_target)
+ return;
+ drop_target_ = drop_target;
+ if (client_)
+ client_->SetCanAcceptDrops(server_id_, !!drop_target_);
+}
+
void Window::SetCanAcceptEvents(bool can_accept_events) {
if (can_accept_events_ == can_accept_events)
return;
@@ -473,6 +481,17 @@ void Window::RequestClose() {
client_->RequestClose(this);
}
+void Window::PerformDragDrop(
+ int drag_pointer,
+ const std::map<std::string, std::vector<uint8_t>>& drag_data,
+ int drag_operation,
+ const gfx::Point& cursor_location,
+ const SkBitmap& bitmap,
+ const base::Callback<void(bool)>& callback) {
+ client_->PerformDragDrop(this, drag_pointer, drag_data, drag_operation,
+ cursor_location, bitmap, callback);
+}
+
void Window::PerformWindowMove(mojom::MoveLoopSource source,
const gfx::Point& cursor_location,
const base::Callback<void(bool)>& callback) {

Powered by Google App Engine
This is Rietveld 408576698