| OLD | NEW |
| 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/ws/connection_manager.h" | 5 #include "components/mus/ws/connection_manager.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "components/mus/ws/client_connection.h" | 9 #include "components/mus/ws/client_connection.h" |
| 10 #include "components/mus/ws/connection_manager_delegate.h" | 10 #include "components/mus/ws/connection_manager_delegate.h" |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 const gfx::Rect& old_bounds, | 248 const gfx::Rect& old_bounds, |
| 249 const gfx::Rect& new_bounds) { | 249 const gfx::Rect& new_bounds) { |
| 250 for (auto& pair : connection_map_) { | 250 for (auto& pair : connection_map_) { |
| 251 pair.second->service()->ProcessWindowBoundsChanged( | 251 pair.second->service()->ProcessWindowBoundsChanged( |
| 252 window, old_bounds, new_bounds, IsChangeSource(pair.first)); | 252 window, old_bounds, new_bounds, IsChangeSource(pair.first)); |
| 253 } | 253 } |
| 254 } | 254 } |
| 255 | 255 |
| 256 void ConnectionManager::ProcessClientAreaChanged( | 256 void ConnectionManager::ProcessClientAreaChanged( |
| 257 const ServerWindow* window, | 257 const ServerWindow* window, |
| 258 const gfx::Rect& old_client_area, | 258 const gfx::Insets& old_client_area, |
| 259 const gfx::Rect& new_client_area) { | 259 const gfx::Insets& new_client_area) { |
| 260 for (auto& pair : connection_map_) { | 260 for (auto& pair : connection_map_) { |
| 261 pair.second->service()->ProcessClientAreaChanged( | 261 pair.second->service()->ProcessClientAreaChanged( |
| 262 window, old_client_area, new_client_area, IsChangeSource(pair.first)); | 262 window, old_client_area, new_client_area, IsChangeSource(pair.first)); |
| 263 } | 263 } |
| 264 } | 264 } |
| 265 | 265 |
| 266 void ConnectionManager::ProcessWillChangeWindowHierarchy( | 266 void ConnectionManager::ProcessWillChangeWindowHierarchy( |
| 267 const ServerWindow* window, | 267 const ServerWindow* window, |
| 268 const ServerWindow* new_parent, | 268 const ServerWindow* new_parent, |
| 269 const ServerWindow* old_parent) { | 269 const ServerWindow* old_parent) { |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 if (!window->parent()) | 380 if (!window->parent()) |
| 381 return; | 381 return; |
| 382 | 382 |
| 383 // TODO(sky): optimize this. | 383 // TODO(sky): optimize this. |
| 384 SchedulePaint(window->parent(), old_bounds); | 384 SchedulePaint(window->parent(), old_bounds); |
| 385 SchedulePaint(window->parent(), new_bounds); | 385 SchedulePaint(window->parent(), new_bounds); |
| 386 } | 386 } |
| 387 | 387 |
| 388 void ConnectionManager::OnWindowClientAreaChanged( | 388 void ConnectionManager::OnWindowClientAreaChanged( |
| 389 ServerWindow* window, | 389 ServerWindow* window, |
| 390 const gfx::Rect& old_client_area, | 390 const gfx::Insets& old_client_area, |
| 391 const gfx::Rect& new_client_area) { | 391 const gfx::Insets& new_client_area) { |
| 392 if (in_destructor_) | 392 if (in_destructor_) |
| 393 return; | 393 return; |
| 394 | 394 |
| 395 ProcessClientAreaChanged(window, old_client_area, new_client_area); | 395 ProcessClientAreaChanged(window, old_client_area, new_client_area); |
| 396 } | 396 } |
| 397 | 397 |
| 398 void ConnectionManager::OnWindowReordered(ServerWindow* window, | 398 void ConnectionManager::OnWindowReordered(ServerWindow* window, |
| 399 ServerWindow* relative, | 399 ServerWindow* relative, |
| 400 mojom::OrderDirection direction) { | 400 mojom::OrderDirection direction) { |
| 401 if (!in_destructor_) | 401 if (!in_destructor_) |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 void ConnectionManager::OnWindowTextInputStateChanged( | 433 void ConnectionManager::OnWindowTextInputStateChanged( |
| 434 ServerWindow* window, | 434 ServerWindow* window, |
| 435 const ui::TextInputState& state) { | 435 const ui::TextInputState& state) { |
| 436 WindowTreeHostImpl* host = GetWindowTreeHostByWindow(window); | 436 WindowTreeHostImpl* host = GetWindowTreeHostByWindow(window); |
| 437 host->UpdateTextInputState(window, state); | 437 host->UpdateTextInputState(window, state); |
| 438 } | 438 } |
| 439 | 439 |
| 440 } // namespace ws | 440 } // namespace ws |
| 441 | 441 |
| 442 } // namespace mus | 442 } // namespace mus |
| OLD | NEW |