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

Unified Diff: chrome/browser/chromeos/chrome_interface_factory.cc

Issue 1684823004: Refactors keyboard related code so mash can use a keyboard (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge to trunk Created 4 years, 10 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 | « chrome/browser/chromeos/chrome_interface_factory.h ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/chrome_interface_factory.cc
diff --git a/chrome/browser/chromeos/chrome_interface_factory.cc b/chrome/browser/chromeos/chrome_interface_factory.cc
new file mode 100644
index 0000000000000000000000000000000000000000..136e5500fcacecf96ffe7e5406b226d8e0973f0c
--- /dev/null
+++ b/chrome/browser/chromeos/chrome_interface_factory.cc
@@ -0,0 +1,28 @@
+// Copyright 2016 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 "chrome/browser/chromeos/chrome_interface_factory.h"
+
+#include "chrome/browser/ui/ash/keyboard_ui_service.h"
+#include "mojo/shell/public/cpp/connection.h"
+
+namespace chromeos {
+
+ChromeInterfaceFactory::ChromeInterfaceFactory() {}
+ChromeInterfaceFactory::~ChromeInterfaceFactory() {}
+
+bool ChromeInterfaceFactory::AcceptConnection(mojo::Connection* connection) {
+ connection->AddInterface(this);
+ return true;
+}
+
+void ChromeInterfaceFactory::Create(
+ mojo::Connection* connection,
+ mojo::InterfaceRequest<keyboard::mojom::Keyboard> request) {
+ if (!keyboard_ui_service_)
+ keyboard_ui_service_.reset(new KeyboardUIService);
+ keyboard_bindings_.AddBinding(keyboard_ui_service_.get(), std::move(request));
+}
+
+} // namespace chromeos
« no previous file with comments | « chrome/browser/chromeos/chrome_interface_factory.h ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698