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

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

Issue 2478383002: Remove SurfaceSequence from mus client code. (Closed)
Patch Set: Only cleanup. Created 4 years, 1 month 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 | « ui/aura/mus/surface_id_handler.h ('k') | ui/aura/mus/window_tree_client.h » ('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 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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 } 215 }
216 216
217 void WindowPortMus::SetSurfaceIdFromServer( 217 void WindowPortMus::SetSurfaceIdFromServer(
218 std::unique_ptr<SurfaceInfo> surface_info) { 218 std::unique_ptr<SurfaceInfo> surface_info) {
219 if (surface_info_) { 219 if (surface_info_) {
220 const cc::SurfaceId& existing_surface_id = surface_info_->surface_id; 220 const cc::SurfaceId& existing_surface_id = surface_info_->surface_id;
221 cc::SurfaceId new_surface_id = 221 cc::SurfaceId new_surface_id =
222 surface_info ? surface_info->surface_id : cc::SurfaceId(); 222 surface_info ? surface_info->surface_id : cc::SurfaceId();
223 if (!existing_surface_id.is_null() && 223 if (!existing_surface_id.is_null() &&
224 existing_surface_id != new_surface_id) { 224 existing_surface_id != new_surface_id) {
225 // Return the existing surface sequence. 225 // TODO(kylechar): Start return reference here?
226 window_tree_client_->OnWindowMusSurfaceDetached(
227 this, surface_info_->surface_sequence);
228 } 226 }
229 } 227 }
230 WindowPortMus* parent = Get(window_->parent()); 228 WindowPortMus* parent = Get(window_->parent());
231 if (parent && parent->surface_id_handler_) { 229 if (parent && parent->surface_id_handler_) {
232 parent->surface_id_handler_->OnChildWindowSurfaceChanged(window_, 230 parent->surface_id_handler_->OnChildWindowSurfaceChanged(window_,
233 &surface_info); 231 &surface_info);
234 } 232 }
235 surface_info_ = std::move(surface_info); 233 surface_info_ = std::move(surface_info);
236 } 234 }
237 235
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 change_data.property_name = 354 change_data.property_name =
357 GetPropertyConverter()->GetTransportNameForPropertyKey(key); 355 GetPropertyConverter()->GetTransportNameForPropertyKey(key);
358 // TODO(sky): investigate to see if we need to compare data. In particular do 356 // TODO(sky): investigate to see if we need to compare data. In particular do
359 // we ever have a case where changing a property cascades into changing the 357 // we ever have a case where changing a property cascades into changing the
360 // same property? 358 // same property?
361 if (!RemoveChangeByTypeAndData(ServerChangeType::PROPERTY, change_data)) 359 if (!RemoveChangeByTypeAndData(ServerChangeType::PROPERTY, change_data))
362 window_tree_client_->OnWindowMusPropertyChanged(this, key, std::move(data)); 360 window_tree_client_->OnWindowMusPropertyChanged(this, key, std::move(data));
363 } 361 }
364 362
365 } // namespace aura 363 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/mus/surface_id_handler.h ('k') | ui/aura/mus/window_tree_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698