OLD | NEW |
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/public/cpp/lib/window_tree_client_impl.h" | 5 #include "components/mus/public/cpp/lib/window_tree_client_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 } | 210 } |
211 | 211 |
212 void WindowTreeClientImpl::RemoveTransientWindowFromParent(Window* window) { | 212 void WindowTreeClientImpl::RemoveTransientWindowFromParent(Window* window) { |
213 DCHECK(tree_); | 213 DCHECK(tree_); |
214 const uint32_t change_id = | 214 const uint32_t change_id = |
215 ScheduleInFlightChange(make_scoped_ptr(new CrashInFlightChange( | 215 ScheduleInFlightChange(make_scoped_ptr(new CrashInFlightChange( |
216 window, ChangeType::REMOVE_TRANSIENT_WINDOW_FROM_PARENT))); | 216 window, ChangeType::REMOVE_TRANSIENT_WINDOW_FROM_PARENT))); |
217 tree_->RemoveTransientWindowFromParent(change_id, window->id()); | 217 tree_->RemoveTransientWindowFromParent(change_id, window->id()); |
218 } | 218 } |
219 | 219 |
| 220 void WindowTreeClientImpl::SetModal(Window* window) { |
| 221 DCHECK(tree_); |
| 222 const uint32_t change_id = ScheduleInFlightChange( |
| 223 make_scoped_ptr(new CrashInFlightChange(window, ChangeType::SET_MODAL))); |
| 224 tree_->SetModal(change_id, window->id()); |
| 225 } |
| 226 |
220 void WindowTreeClientImpl::Reorder(Window* window, | 227 void WindowTreeClientImpl::Reorder(Window* window, |
221 Id relative_window_id, | 228 Id relative_window_id, |
222 mojom::OrderDirection direction) { | 229 mojom::OrderDirection direction) { |
223 DCHECK(tree_); | 230 DCHECK(tree_); |
224 const uint32_t change_id = ScheduleInFlightChange( | 231 const uint32_t change_id = ScheduleInFlightChange( |
225 make_scoped_ptr(new CrashInFlightChange(window, ChangeType::REORDER))); | 232 make_scoped_ptr(new CrashInFlightChange(window, ChangeType::REORDER))); |
226 tree_->ReorderWindow(change_id, window->id(), relative_window_id, direction); | 233 tree_->ReorderWindow(change_id, window->id(), relative_window_id, direction); |
227 } | 234 } |
228 | 235 |
229 bool WindowTreeClientImpl::OwnsWindow(Window* window) const { | 236 bool WindowTreeClientImpl::OwnsWindow(Window* window) const { |
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
979 | 986 |
980 void WindowTreeClientImpl::SetUnderlaySurfaceOffsetAndExtendedHitArea( | 987 void WindowTreeClientImpl::SetUnderlaySurfaceOffsetAndExtendedHitArea( |
981 Window* window, | 988 Window* window, |
982 const gfx::Vector2d& offset, | 989 const gfx::Vector2d& offset, |
983 const gfx::Insets& hit_area) { | 990 const gfx::Insets& hit_area) { |
984 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea( | 991 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea( |
985 window->id(), offset.x(), offset.y(), mojo::Insets::From(hit_area)); | 992 window->id(), offset.x(), offset.y(), mojo::Insets::From(hit_area)); |
986 } | 993 } |
987 | 994 |
988 } // namespace mus | 995 } // namespace mus |
OLD | NEW |