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

Side by Side Diff: services/ui/public/cpp/window.cc

Issue 2352233002: mus drag and drop: Add API to let the client cancel the drag. (Closed)
Patch Set: A bunch of dvlogs Created 4 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 unified diff | Download patch
« no previous file with comments | « services/ui/public/cpp/window.h ('k') | services/ui/public/cpp/window_tree_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "services/ui/public/cpp/window.h" 5 #include "services/ui/public/cpp/window.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 int drag_pointer, 485 int drag_pointer,
486 const std::map<std::string, std::vector<uint8_t>>& drag_data, 486 const std::map<std::string, std::vector<uint8_t>>& drag_data,
487 int drag_operation, 487 int drag_operation,
488 const gfx::Point& cursor_location, 488 const gfx::Point& cursor_location,
489 const SkBitmap& bitmap, 489 const SkBitmap& bitmap,
490 const base::Callback<void(bool, uint32_t)>& callback) { 490 const base::Callback<void(bool, uint32_t)>& callback) {
491 client_->PerformDragDrop(this, drag_pointer, drag_data, drag_operation, 491 client_->PerformDragDrop(this, drag_pointer, drag_data, drag_operation,
492 cursor_location, bitmap, callback); 492 cursor_location, bitmap, callback);
493 } 493 }
494 494
495 void Window::CancelDragDrop() {
496 client_->CancelDragDrop(this);
497 }
498
495 void Window::PerformWindowMove(mojom::MoveLoopSource source, 499 void Window::PerformWindowMove(mojom::MoveLoopSource source,
496 const gfx::Point& cursor_location, 500 const gfx::Point& cursor_location,
497 const base::Callback<void(bool)>& callback) { 501 const base::Callback<void(bool)>& callback) {
498 client_->PerformWindowMove(this, source, cursor_location, callback); 502 client_->PerformWindowMove(this, source, cursor_location, callback);
499 } 503 }
500 504
501 void Window::CancelWindowMove() { 505 void Window::CancelWindowMove() {
502 client_->CancelWindowMove(this); 506 client_->CancelWindowMove(this);
503 } 507 }
504 508
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
921 notifier->NotifyWindowReordered(); 925 notifier->NotifyWindowReordered();
922 926
923 return true; 927 return true;
924 } 928 }
925 929
926 // static 930 // static
927 Window** Window::GetStackingTarget(Window* window) { 931 Window** Window::GetStackingTarget(Window* window) {
928 return &window->stacking_target_; 932 return &window->stacking_target_;
929 } 933 }
930 } // namespace ui 934 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/public/cpp/window.h ('k') | services/ui/public/cpp/window_tree_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698