| 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 "mojo/services/view_manager/connection_manager.h" | 5 #include "mojo/services/view_manager/connection_manager.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "mojo/public/cpp/application/application_connection.h" | 8 #include "mojo/public/cpp/application/application_connection.h" |
| 9 #include "mojo/public/interfaces/application/service_provider.mojom.h" | 9 #include "mojo/public/interfaces/application/service_provider.mojom.h" |
| 10 #include "mojo/services/public/cpp/input_events/input_events_type_converters.h" | 10 #include "mojo/services/public/cpp/input_events/input_events_type_converters.h" |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 | 272 |
| 273 // TODO(sky): optimize this. | 273 // TODO(sky): optimize this. |
| 274 display_manager_.SchedulePaint(view->parent(), old_bounds); | 274 display_manager_.SchedulePaint(view->parent(), old_bounds); |
| 275 display_manager_.SchedulePaint(view->parent(), new_bounds); | 275 display_manager_.SchedulePaint(view->parent(), new_bounds); |
| 276 } | 276 } |
| 277 | 277 |
| 278 void ConnectionManager::OnViewSurfaceIdChanged(const ServerView* view) { | 278 void ConnectionManager::OnViewSurfaceIdChanged(const ServerView* view) { |
| 279 display_manager_.SchedulePaint(view, gfx::Rect(view->bounds().size())); | 279 display_manager_.SchedulePaint(view, gfx::Rect(view->bounds().size())); |
| 280 } | 280 } |
| 281 | 281 |
| 282 void ConnectionManager::OnViewReordered(const ServerView* view, |
| 283 const ServerView* relative, |
| 284 OrderDirection direction) { |
| 285 display_manager_.SchedulePaint(view, gfx::Rect(view->bounds().size())); |
| 286 } |
| 287 |
| 282 void ConnectionManager::OnWillChangeViewVisibility(const ServerView* view) { | 288 void ConnectionManager::OnWillChangeViewVisibility(const ServerView* view) { |
| 283 for (ConnectionMap::iterator i = connection_map_.begin(); | 289 for (ConnectionMap::iterator i = connection_map_.begin(); |
| 284 i != connection_map_.end(); | 290 i != connection_map_.end(); |
| 285 ++i) { | 291 ++i) { |
| 286 i->second->ProcessWillChangeViewVisibility(view, IsChangeSource(i->first)); | 292 i->second->ProcessWillChangeViewVisibility(view, IsChangeSource(i->first)); |
| 287 } | 293 } |
| 288 } | 294 } |
| 289 | 295 |
| 290 } // namespace service | 296 } // namespace service |
| 291 } // namespace mojo | 297 } // namespace mojo |
| OLD | NEW |