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

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

Issue 2489513003: Fixes and test updates for aura-mus (Closed)
Patch Set: feedback 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 | « no previous file | ui/views/mus/desktop_window_tree_host_mus.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"
11 #include "ui/aura/mus/window_tree_client.h" 11 #include "ui/aura/mus/window_tree_client.h"
12 #include "ui/aura/mus/window_tree_client_delegate.h" 12 #include "ui/aura/mus/window_tree_client_delegate.h"
13 #include "ui/aura/window.h" 13 #include "ui/aura/window.h"
14 #include "ui/aura/window_delegate.h"
14 #include "ui/aura/window_observer.h" 15 #include "ui/aura/window_observer.h"
15 #include "ui/aura/window_property.h" 16 #include "ui/aura/window_property.h"
16 17
17 namespace aura { 18 namespace aura {
18 19
19 WindowPortMus::WindowMusChangeDataImpl::WindowMusChangeDataImpl() = default; 20 WindowPortMus::WindowMusChangeDataImpl::WindowMusChangeDataImpl() = default;
20 21
21 WindowPortMus::WindowMusChangeDataImpl::~WindowMusChangeDataImpl() = default; 22 WindowPortMus::WindowMusChangeDataImpl::~WindowMusChangeDataImpl() = default;
22 23
23 // static 24 // static
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 void WindowPortMus::NotifyEmbeddedAppDisconnected() { 300 void WindowPortMus::NotifyEmbeddedAppDisconnected() {
300 for (WindowObserver& observer : *GetObservers(window_)) 301 for (WindowObserver& observer : *GetObservers(window_))
301 observer.OnEmbeddedAppDisconnected(window_); 302 observer.OnEmbeddedAppDisconnected(window_);
302 } 303 }
303 304
304 void WindowPortMus::OnPreInit(Window* window) { 305 void WindowPortMus::OnPreInit(Window* window) {
305 window_ = window; 306 window_ = window;
306 window_tree_client_->OnWindowMusCreated(this); 307 window_tree_client_->OnWindowMusCreated(this);
307 } 308 }
308 309
309 void WindowPortMus::OnDeviceScaleFactorChanged(float device_scale_factor) {} 310 void WindowPortMus::OnDeviceScaleFactorChanged(float device_scale_factor) {
311 if (window_->delegate())
312 window_->delegate()->OnDeviceScaleFactorChanged(device_scale_factor);
313 }
310 314
311 void WindowPortMus::OnWillAddChild(Window* child) { 315 void WindowPortMus::OnWillAddChild(Window* child) {
312 ServerChangeData change_data; 316 ServerChangeData change_data;
313 change_data.child_id = Get(child)->server_id(); 317 change_data.child_id = Get(child)->server_id();
314 if (!RemoveChangeByTypeAndData(ServerChangeType::ADD, change_data)) 318 if (!RemoveChangeByTypeAndData(ServerChangeType::ADD, change_data))
315 window_tree_client_->OnWindowMusAddChild(this, Get(child)); 319 window_tree_client_->OnWindowMusAddChild(this, Get(child));
316 } 320 }
317 321
318 void WindowPortMus::OnWillRemoveChild(Window* child) { 322 void WindowPortMus::OnWillRemoveChild(Window* child) {
319 ServerChangeData change_data; 323 ServerChangeData change_data;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 change_data.property_name = 360 change_data.property_name =
357 GetPropertyConverter()->GetTransportNameForPropertyKey(key); 361 GetPropertyConverter()->GetTransportNameForPropertyKey(key);
358 // TODO(sky): investigate to see if we need to compare data. In particular do 362 // 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 363 // we ever have a case where changing a property cascades into changing the
360 // same property? 364 // same property?
361 if (!RemoveChangeByTypeAndData(ServerChangeType::PROPERTY, change_data)) 365 if (!RemoveChangeByTypeAndData(ServerChangeType::PROPERTY, change_data))
362 window_tree_client_->OnWindowMusPropertyChanged(this, key, std::move(data)); 366 window_tree_client_->OnWindowMusPropertyChanged(this, key, std::move(data));
363 } 367 }
364 368
365 } // namespace aura 369 } // namespace aura
OLDNEW
« no previous file with comments | « no previous file | ui/views/mus/desktop_window_tree_host_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698