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

Side by Side Diff: mojo/services/view_manager/window_manager_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: 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
(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/window_manager_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 WindowManagerClientImpl::WindowManagerClientImpl(
15 ConnectionManager* connection_manager)
16 : connection_manager_(connection_manager) {
17 }
18
19 WindowManagerClientImpl::~WindowManagerClientImpl() {
20 }
21
22 void WindowManagerClientImpl::DispatchInputEventToView(Id transport_view_id,
23 EventPtr event) {
24 const ViewId view_id(ViewIdFromTransportId(transport_view_id));
25
26 ViewManagerServiceImpl* connection =
27 connection_manager_->GetConnectionWithRoot(view_id);
28 if (!connection)
29 connection = connection_manager_->GetConnection(view_id.connection_id);
30 if (connection) {
31 connection->client()->OnViewInputEvent(
32 transport_view_id, event.Pass(), base::Bind(&base::DoNothing));
33 }
34 }
35
36 void WindowManagerClientImpl::OnConnectionError() {
37 // TODO(sky): deal with this. We may need to tear everything down here.
38 }
39
40 } // namespace service
41 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/view_manager/window_manager_client_impl.h ('k') | mojo/services/window_manager/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698