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

Side by Side Diff: components/mus/ws/window_tree.cc

Issue 2080513002: Deletes mojo::Callback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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 | « components/mus/ws/window_tree.h ('k') | components/mus/ws/window_tree_client_unittest.cc » ('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 "components/mus/ws/window_tree.h" 5 #include "components/mus/ws/window_tree.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 13 matching lines...) Expand all
24 #include "components/mus/ws/server_window_observer.h" 24 #include "components/mus/ws/server_window_observer.h"
25 #include "components/mus/ws/user_display_manager.h" 25 #include "components/mus/ws/user_display_manager.h"
26 #include "components/mus/ws/window_manager_state.h" 26 #include "components/mus/ws/window_manager_state.h"
27 #include "components/mus/ws/window_server.h" 27 #include "components/mus/ws/window_server.h"
28 #include "components/mus/ws/window_tree_binding.h" 28 #include "components/mus/ws/window_tree_binding.h"
29 #include "ui/display/display.h" 29 #include "ui/display/display.h"
30 #include "ui/platform_window/mojo/ime_type_converters.h" 30 #include "ui/platform_window/mojo/ime_type_converters.h"
31 #include "ui/platform_window/text_input_state.h" 31 #include "ui/platform_window/text_input_state.h"
32 32
33 using mojo::Array; 33 using mojo::Array;
34 using mojo::Callback;
35 using mojo::InterfaceRequest; 34 using mojo::InterfaceRequest;
36 using mojo::String; 35 using mojo::String;
37 36
38 namespace mus { 37 namespace mus {
39 namespace ws { 38 namespace ws {
40 39
41 class TargetedEvent : public ServerWindowObserver { 40 class TargetedEvent : public ServerWindowObserver {
42 public: 41 public:
43 TargetedEvent(ServerWindow* target, const ui::Event& event) 42 TargetedEvent(ServerWindow* target, const ui::Event& event)
44 : target_(target), event_(ui::Event::Clone(event)) { 43 : target_(target), event_(ui::Event::Clone(event)) {
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after
1113 success = true; 1112 success = true;
1114 Operation op(this, window_server_, OperationType::REORDER_WINDOW); 1113 Operation op(this, window_server_, OperationType::REORDER_WINDOW);
1115 window->Reorder(relative_window, direction); 1114 window->Reorder(relative_window, direction);
1116 window_server_->ProcessWindowReorder(window, relative_window, direction); 1115 window_server_->ProcessWindowReorder(window, relative_window, direction);
1117 } 1116 }
1118 client()->OnChangeCompleted(change_id, success); 1117 client()->OnChangeCompleted(change_id, success);
1119 } 1118 }
1120 1119
1121 void WindowTree::GetWindowTree( 1120 void WindowTree::GetWindowTree(
1122 Id window_id, 1121 Id window_id,
1123 const Callback<void(Array<mojom::WindowDataPtr>)>& callback) { 1122 const base::Callback<void(Array<mojom::WindowDataPtr>)>& callback) {
1124 std::vector<const ServerWindow*> windows( 1123 std::vector<const ServerWindow*> windows(
1125 GetWindowTree(ClientWindowId(window_id))); 1124 GetWindowTree(ClientWindowId(window_id)));
1126 callback.Run(WindowsToWindowDatas(windows)); 1125 callback.Run(WindowsToWindowDatas(windows));
1127 } 1126 }
1128 1127
1129 void WindowTree::SetCapture(uint32_t change_id, Id window_id) { 1128 void WindowTree::SetCapture(uint32_t change_id, Id window_id) {
1130 client()->OnChangeCompleted(change_id, SetCapture(ClientWindowId(window_id))); 1129 client()->OnChangeCompleted(change_id, SetCapture(ClientWindowId(window_id)));
1131 } 1130 }
1132 1131
1133 void WindowTree::ReleaseCapture(uint32_t change_id, Id window_id) { 1132 void WindowTree::ReleaseCapture(uint32_t change_id, Id window_id) {
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
1508 } 1507 }
1509 1508
1510 bool WindowTree::IsWindowRootOfAnotherTreeForAccessPolicy( 1509 bool WindowTree::IsWindowRootOfAnotherTreeForAccessPolicy(
1511 const ServerWindow* window) const { 1510 const ServerWindow* window) const {
1512 WindowTree* tree = window_server_->GetTreeWithRoot(window); 1511 WindowTree* tree = window_server_->GetTreeWithRoot(window);
1513 return tree && tree != this; 1512 return tree && tree != this;
1514 } 1513 }
1515 1514
1516 } // namespace ws 1515 } // namespace ws
1517 } // namespace mus 1516 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/ws/window_tree.h ('k') | components/mus/ws/window_tree_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698