| 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/display_manager.h" | 5 #include "mojo/services/view_manager/display_manager.h" |
| 6 | 6 |
| 7 #include "base/numerics/safe_conversions.h" | 7 #include "base/numerics/safe_conversions.h" |
| 8 #include "cc/surfaces/surface_id_allocator.h" | 8 #include "cc/surfaces/surface_id_allocator.h" |
| 9 #include "mojo/converters/geometry/geometry_type_converters.h" | 9 #include "mojo/converters/geometry/geometry_type_converters.h" |
| 10 #include "mojo/converters/surfaces/surfaces_type_converters.h" | 10 #include "mojo/converters/surfaces/surfaces_type_converters.h" |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 connection_manager_->root()->SetBounds(gfx::Rect(size_)); | 153 connection_manager_->root()->SetBounds(gfx::Rect(size_)); |
| 154 if (surface_id_.is_null()) | 154 if (surface_id_.is_null()) |
| 155 return; | 155 return; |
| 156 surface_->DestroySurface(SurfaceId::From(surface_id_)); | 156 surface_->DestroySurface(SurfaceId::From(surface_id_)); |
| 157 surface_id_ = cc::SurfaceId(); | 157 surface_id_ = cc::SurfaceId(); |
| 158 SchedulePaint(connection_manager_->root(), gfx::Rect(size_)); | 158 SchedulePaint(connection_manager_->root(), gfx::Rect(size_)); |
| 159 } | 159 } |
| 160 | 160 |
| 161 void DisplayManager::OnEvent(EventPtr event, | 161 void DisplayManager::OnEvent(EventPtr event, |
| 162 const mojo::Callback<void()>& callback) { | 162 const mojo::Callback<void()>& callback) { |
| 163 connection_manager_->DispatchViewInputEventToWindowManager(event.Pass()); | 163 connection_manager_->DispatchViewInputEventToDelegate(event.Pass()); |
| 164 callback.Run(); | 164 callback.Run(); |
| 165 } | 165 } |
| 166 | 166 |
| 167 void DisplayManager::ReturnResources(Array<ReturnedResourcePtr> resources) { | 167 void DisplayManager::ReturnResources(Array<ReturnedResourcePtr> resources) { |
| 168 DCHECK_EQ(0u, resources.size()); | 168 DCHECK_EQ(0u, resources.size()); |
| 169 } | 169 } |
| 170 | 170 |
| 171 } // namespace service | 171 } // namespace service |
| 172 } // namespace mojo | 172 } // namespace mojo |
| OLD | NEW |