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

Side by Side Diff: mojo/services/view_manager/display_manager.cc

Issue 636363002: Splits window manager like methods into ViewManagerServiceDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge 2 trunk Created 6 years, 2 months 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
OLDNEW
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
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
OLDNEW
« no previous file with comments | « mojo/services/view_manager/connection_manager.cc ('k') | mojo/services/view_manager/view_manager_init_service_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698