OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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 "chrome/browser/chromeos/chrome_interface_factory.h" |
| 6 |
| 7 #include "chrome/browser/ui/ash/keyboard_ui_service.h" |
| 8 #include "mojo/shell/public/cpp/connection.h" |
| 9 |
| 10 namespace chromeos { |
| 11 |
| 12 ChromeInterfaceFactory::ChromeInterfaceFactory() {} |
| 13 ChromeInterfaceFactory::~ChromeInterfaceFactory() {} |
| 14 |
| 15 bool ChromeInterfaceFactory::AcceptConnection(mojo::Connection* connection) { |
| 16 connection->AddInterface(this); |
| 17 return true; |
| 18 } |
| 19 |
| 20 void ChromeInterfaceFactory::Create( |
| 21 mojo::Connection* connection, |
| 22 mojo::InterfaceRequest<keyboard::mojom::Keyboard> request) { |
| 23 if (!keyboard_ui_service_) |
| 24 keyboard_ui_service_.reset(new KeyboardUIService); |
| 25 keyboard_bindings_.AddBinding(keyboard_ui_service_.get(), std::move(request)); |
| 26 } |
| 27 |
| 28 } // namespace chromeos |
OLD | NEW |