| Index: mojo/services/view_manager/window_manager_client_impl.cc
|
| diff --git a/mojo/services/view_manager/window_manager_client_impl.cc b/mojo/services/view_manager/window_manager_client_impl.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..493e8f10209353997e40c12ad5e1d3e60c47cb46
|
| --- /dev/null
|
| +++ b/mojo/services/view_manager/window_manager_client_impl.cc
|
| @@ -0,0 +1,41 @@
|
| +// 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/window_manager_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 {
|
| +
|
| +WindowManagerClientImpl::WindowManagerClientImpl(
|
| + ConnectionManager* connection_manager)
|
| + : connection_manager_(connection_manager) {
|
| +}
|
| +
|
| +WindowManagerClientImpl::~WindowManagerClientImpl() {
|
| +}
|
| +
|
| +void WindowManagerClientImpl::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 WindowManagerClientImpl::OnConnectionError() {
|
| + // TODO(sky): deal with this. We may need to tear everything down here.
|
| +}
|
| +
|
| +} // namespace service
|
| +} // namespace mojo
|
|
|