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

Side by Side Diff: ui/aura/mus/window_port_mus.cc

Issue 2559703003: Converts WindowTreeClientTest to be in terms of aura (Closed)
Patch Set: tweak Created 4 years 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ui/aura/mus/window_port_mus.h" 5 #include "ui/aura/mus/window_port_mus.h"
6 6
7 #include "ui/aura/client/aura_constants.h" 7 #include "ui/aura/client/aura_constants.h"
8 #include "ui/aura/client/transient_window_client.h" 8 #include "ui/aura/client/transient_window_client.h"
9 #include "ui/aura/mus/property_converter.h" 9 #include "ui/aura/mus/property_converter.h"
10 #include "ui/aura/mus/surface_id_handler.h" 10 #include "ui/aura/mus/surface_id_handler.h"
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 WindowPortMus::PrepareForServerVisibilityChange(bool value) { 325 WindowPortMus::PrepareForServerVisibilityChange(bool value) {
326 std::unique_ptr<WindowMusChangeDataImpl> data( 326 std::unique_ptr<WindowMusChangeDataImpl> data(
327 base::MakeUnique<WindowMusChangeDataImpl>()); 327 base::MakeUnique<WindowMusChangeDataImpl>());
328 ServerChangeData change_data; 328 ServerChangeData change_data;
329 change_data.visible = value; 329 change_data.visible = value;
330 data->change = base::MakeUnique<ScopedServerChange>( 330 data->change = base::MakeUnique<ScopedServerChange>(
331 this, ServerChangeType::VISIBLE, change_data); 331 this, ServerChangeType::VISIBLE, change_data);
332 return std::move(data); 332 return std::move(data);
333 } 333 }
334 334
335 void WindowPortMus::PrepareForDestroy() {
336 ScheduleChange(ServerChangeType::DESTROY, ServerChangeData());
337 }
338
335 void WindowPortMus::PrepareForTransientRestack(WindowMus* window) { 339 void WindowPortMus::PrepareForTransientRestack(WindowMus* window) {
336 ServerChangeData change_data; 340 ServerChangeData change_data;
337 change_data.child_id = window->server_id(); 341 change_data.child_id = window->server_id();
338 ScheduleChange(ServerChangeType::TRANSIENT_REORDER, change_data); 342 ScheduleChange(ServerChangeType::TRANSIENT_REORDER, change_data);
339 } 343 }
340 344
341 void WindowPortMus::OnTransientRestackDone(WindowMus* window) { 345 void WindowPortMus::OnTransientRestackDone(WindowMus* window) {
342 ServerChangeData change_data; 346 ServerChangeData change_data;
343 change_data.child_id = window->server_id(); 347 change_data.child_id = window->server_id();
344 const bool removed = RemoveChangeByTypeAndData( 348 const bool removed = RemoveChangeByTypeAndData(
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 change_data.property_name = 418 change_data.property_name =
415 GetPropertyConverter()->GetTransportNameForPropertyKey(key); 419 GetPropertyConverter()->GetTransportNameForPropertyKey(key);
416 // TODO(sky): investigate to see if we need to compare data. In particular do 420 // TODO(sky): investigate to see if we need to compare data. In particular do
417 // we ever have a case where changing a property cascades into changing the 421 // we ever have a case where changing a property cascades into changing the
418 // same property? 422 // same property?
419 if (!RemoveChangeByTypeAndData(ServerChangeType::PROPERTY, change_data)) 423 if (!RemoveChangeByTypeAndData(ServerChangeType::PROPERTY, change_data))
420 window_tree_client_->OnWindowMusPropertyChanged(this, key, std::move(data)); 424 window_tree_client_->OnWindowMusPropertyChanged(this, key, std::move(data));
421 } 425 }
422 426
423 } // namespace aura 427 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698