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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« 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