| Index: mojo/services/view_manager/view_manager_service_delegate_client_impl.cc
|
| diff --git a/mojo/services/view_manager/view_manager_service_delegate_client_impl.cc b/mojo/services/view_manager/view_manager_service_delegate_client_impl.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a06eb60ecd717fd67aeff3d7480ed599c3d6b598
|
| --- /dev/null
|
| +++ b/mojo/services/view_manager/view_manager_service_delegate_client_impl.cc
|
| @@ -0,0 +1,42 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "mojo/services/view_manager/view_manager_service_delegate_client_impl.h"
|
| +
|
| +#include "base/bind.h"
|
| +#include "mojo/services/view_manager/connection_manager.h"
|
| +#include "mojo/services/view_manager/view_manager_service_impl.h"
|
| +
|
| +namespace mojo {
|
| +namespace service {
|
| +
|
| +ViewManagerServiceDelegateClientImpl::ViewManagerServiceDelegateClientImpl(
|
| + ConnectionManager* connection_manager)
|
| + : connection_manager_(connection_manager) {
|
| +}
|
| +
|
| +ViewManagerServiceDelegateClientImpl::~ViewManagerServiceDelegateClientImpl() {
|
| +}
|
| +
|
| +void ViewManagerServiceDelegateClientImpl::DispatchInputEventToView(
|
| + Id transport_view_id,
|
| + EventPtr event) {
|
| + const ViewId view_id(ViewIdFromTransportId(transport_view_id));
|
| +
|
| + ViewManagerServiceImpl* connection =
|
| + connection_manager_->GetConnectionWithRoot(view_id);
|
| + if (!connection)
|
| + connection = connection_manager_->GetConnection(view_id.connection_id);
|
| + if (connection) {
|
| + connection->client()->OnViewInputEvent(
|
| + transport_view_id, event.Pass(), base::Bind(&base::DoNothing));
|
| + }
|
| +}
|
| +
|
| +void ViewManagerServiceDelegateClientImpl::OnConnectionError() {
|
| + // TODO(sky): deal with this. We may need to tear everything down here.
|
| +}
|
| +
|
| +} // namespace service
|
| +} // namespace mojo
|
|
|