| OLD | NEW |
| 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 GetPropertyConverter()->SetPropertyFromTransportValue(window_, property_name, | 214 GetPropertyConverter()->SetPropertyFromTransportValue(window_, property_name, |
| 215 property_data); | 215 property_data); |
| 216 } | 216 } |
| 217 | 217 |
| 218 void WindowPortMus::SetSurfaceIdFromServer( | 218 void WindowPortMus::SetSurfaceIdFromServer( |
| 219 std::unique_ptr<SurfaceInfo> surface_info) { | 219 std::unique_ptr<SurfaceInfo> surface_info) { |
| 220 if (surface_info_) { | 220 if (surface_info_) { |
| 221 const cc::SurfaceId& existing_surface_id = surface_info_->surface_id; | 221 const cc::SurfaceId& existing_surface_id = surface_info_->surface_id; |
| 222 cc::SurfaceId new_surface_id = | 222 cc::SurfaceId new_surface_id = |
| 223 surface_info ? surface_info->surface_id : cc::SurfaceId(); | 223 surface_info ? surface_info->surface_id : cc::SurfaceId(); |
| 224 if (!existing_surface_id.is_null() && | 224 if (existing_surface_id.is_valid() && |
| 225 existing_surface_id != new_surface_id) { | 225 existing_surface_id != new_surface_id) { |
| 226 // TODO(kylechar): Start return reference here? | 226 // TODO(kylechar): Start return reference here? |
| 227 } | 227 } |
| 228 } | 228 } |
| 229 WindowPortMus* parent = Get(window_->parent()); | 229 WindowPortMus* parent = Get(window_->parent()); |
| 230 if (parent && parent->surface_id_handler_) { | 230 if (parent && parent->surface_id_handler_) { |
| 231 parent->surface_id_handler_->OnChildWindowSurfaceChanged(window_, | 231 parent->surface_id_handler_->OnChildWindowSurfaceChanged(window_, |
| 232 &surface_info); | 232 &surface_info); |
| 233 } | 233 } |
| 234 surface_info_ = std::move(surface_info); | 234 surface_info_ = std::move(surface_info); |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 change_data.property_name = | 358 change_data.property_name = |
| 359 GetPropertyConverter()->GetTransportNameForPropertyKey(key); | 359 GetPropertyConverter()->GetTransportNameForPropertyKey(key); |
| 360 // TODO(sky): investigate to see if we need to compare data. In particular do | 360 // TODO(sky): investigate to see if we need to compare data. In particular do |
| 361 // we ever have a case where changing a property cascades into changing the | 361 // we ever have a case where changing a property cascades into changing the |
| 362 // same property? | 362 // same property? |
| 363 if (!RemoveChangeByTypeAndData(ServerChangeType::PROPERTY, change_data)) | 363 if (!RemoveChangeByTypeAndData(ServerChangeType::PROPERTY, change_data)) |
| 364 window_tree_client_->OnWindowMusPropertyChanged(this, key, std::move(data)); | 364 window_tree_client_->OnWindowMusPropertyChanged(this, key, std::move(data)); |
| 365 } | 365 } |
| 366 | 366 |
| 367 } // namespace aura | 367 } // namespace aura |
| OLD | NEW |