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

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

Issue 2323553002: mash: Use the new mus drag and drop API to get drag working in mash. (Closed)
Patch Set: comments 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 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 else 474 else
475 callback.Run(false); 475 callback.Run(false);
476 } 476 }
477 477
478 void Window::RequestClose() { 478 void Window::RequestClose() {
479 if (client_) 479 if (client_)
480 client_->RequestClose(this); 480 client_->RequestClose(this);
481 } 481 }
482 482
483 void Window::PerformDragDrop( 483 void Window::PerformDragDrop(
484 int drag_pointer,
485 const std::map<std::string, std::vector<uint8_t>>& drag_data, 484 const std::map<std::string, std::vector<uint8_t>>& drag_data,
486 int drag_operation, 485 int drag_operation,
487 const gfx::Point& cursor_location, 486 const gfx::Point& cursor_location,
488 const SkBitmap& bitmap, 487 const SkBitmap& bitmap,
489 const base::Callback<void(bool, uint32_t)>& callback) { 488 const base::Callback<void(bool, uint32_t)>& callback) {
490 client_->PerformDragDrop(this, drag_pointer, drag_data, drag_operation, 489 client_->PerformDragDrop(this, drag_data, drag_operation, cursor_location,
491 cursor_location, bitmap, callback); 490 bitmap, callback);
492 } 491 }
493 492
494 void Window::CancelDragDrop() { 493 void Window::CancelDragDrop() {
495 client_->CancelDragDrop(this); 494 client_->CancelDragDrop(this);
496 } 495 }
497 496
498 void Window::PerformWindowMove(mojom::MoveLoopSource source, 497 void Window::PerformWindowMove(mojom::MoveLoopSource source,
499 const gfx::Point& cursor_location, 498 const gfx::Point& cursor_location,
500 const base::Callback<void(bool)>& callback) { 499 const base::Callback<void(bool)>& callback) {
501 client_->PerformWindowMove(this, source, cursor_location, callback); 500 client_->PerformWindowMove(this, source, cursor_location, callback);
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
924 notifier->NotifyWindowReordered(); 923 notifier->NotifyWindowReordered();
925 924
926 return true; 925 return true;
927 } 926 }
928 927
929 // static 928 // static
930 Window** Window::GetStackingTarget(Window* window) { 929 Window** Window::GetStackingTarget(Window* window) {
931 return &window->stacking_target_; 930 return &window->stacking_target_;
932 } 931 }
933 } // namespace ui 932 } // 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