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

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

Issue 636363002: Splits window manager like methods into ViewManagerServiceDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor cleanup 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "mojo/services/view_manager/view_manager_service_delegate_client_impl.h "
6
7 #include "base/bind.h"
8 #include "mojo/services/view_manager/connection_manager.h"
9 #include "mojo/services/view_manager/view_manager_service_impl.h"
10
11 namespace mojo {
12 namespace service {
13
14 ViewManagerServiceDelegateClientImpl::ViewManagerServiceDelegateClientImpl(
15 ConnectionManager* connection_manager)
16 : connection_manager_(connection_manager) {
17 }
18
19 ViewManagerServiceDelegateClientImpl::~ViewManagerServiceDelegateClientImpl() {
20 }
21
22 void ViewManagerServiceDelegateClientImpl::DispatchInputEventToView(
23 Id transport_view_id,
24 EventPtr event) {
25 const ViewId view_id(ViewIdFromTransportId(transport_view_id));
26
27 ViewManagerServiceImpl* connection =
28 connection_manager_->GetConnectionWithRoot(view_id);
29 if (!connection)
30 connection = connection_manager_->GetConnection(view_id.connection_id);
31 if (connection) {
32 connection->client()->OnViewInputEvent(
33 transport_view_id, event.Pass(), base::Bind(&base::DoNothing));
34 }
35 }
36
37 void ViewManagerServiceDelegateClientImpl::OnConnectionError() {
38 // TODO(sky): deal with this. We may need to tear everything down here.
39 }
40
41 } // namespace service
42 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698