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

Side by Side Diff: components/mus/public/cpp/lib/window_tree_client_impl.cc

Issue 1811913004: mus: Allow SetModal to fail gracefully (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed constructor/destructor Created 4 years, 9 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
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/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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 DCHECK(tree_); 212 DCHECK(tree_);
213 const uint32_t change_id = 213 const uint32_t change_id =
214 ScheduleInFlightChange(make_scoped_ptr(new CrashInFlightChange( 214 ScheduleInFlightChange(make_scoped_ptr(new CrashInFlightChange(
215 window, ChangeType::REMOVE_TRANSIENT_WINDOW_FROM_PARENT))); 215 window, ChangeType::REMOVE_TRANSIENT_WINDOW_FROM_PARENT)));
216 tree_->RemoveTransientWindowFromParent(change_id, window->id()); 216 tree_->RemoveTransientWindowFromParent(change_id, window->id());
217 } 217 }
218 218
219 void WindowTreeClientImpl::SetModal(Window* window) { 219 void WindowTreeClientImpl::SetModal(Window* window) {
220 DCHECK(tree_); 220 DCHECK(tree_);
221 const uint32_t change_id = ScheduleInFlightChange( 221 const uint32_t change_id = ScheduleInFlightChange(
222 make_scoped_ptr(new CrashInFlightChange(window, ChangeType::SET_MODAL))); 222 make_scoped_ptr(new InFlightSetModalChange(window)));
223 tree_->SetModal(change_id, window->id()); 223 tree_->SetModal(change_id, window->id());
224 } 224 }
225 225
226 void WindowTreeClientImpl::Reorder(Window* window, 226 void WindowTreeClientImpl::Reorder(Window* window,
227 Id relative_window_id, 227 Id relative_window_id,
228 mojom::OrderDirection direction) { 228 mojom::OrderDirection direction) {
229 DCHECK(tree_); 229 DCHECK(tree_);
230 const uint32_t change_id = ScheduleInFlightChange( 230 const uint32_t change_id = ScheduleInFlightChange(
231 make_scoped_ptr(new CrashInFlightChange(window, ChangeType::REORDER))); 231 make_scoped_ptr(new CrashInFlightChange(window, ChangeType::REORDER)));
232 tree_->ReorderWindow(change_id, window->id(), relative_window_id, direction); 232 tree_->ReorderWindow(change_id, window->id(), relative_window_id, direction);
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
980 980
981 void WindowTreeClientImpl::SetUnderlaySurfaceOffsetAndExtendedHitArea( 981 void WindowTreeClientImpl::SetUnderlaySurfaceOffsetAndExtendedHitArea(
982 Window* window, 982 Window* window,
983 const gfx::Vector2d& offset, 983 const gfx::Vector2d& offset,
984 const gfx::Insets& hit_area) { 984 const gfx::Insets& hit_area) {
985 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea( 985 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea(
986 window->id(), offset.x(), offset.y(), mojo::Insets::From(hit_area)); 986 window->id(), offset.x(), offset.y(), mojo::Insets::From(hit_area));
987 } 987 }
988 988
989 } // namespace mus 989 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/public/cpp/lib/window_private.h ('k') | components/mus/public/cpp/tests/test_window_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698