OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/chromeos/chrome_interface_factory.h" | 5 #include "chrome/browser/chromeos/chrome_interface_factory.h" |
6 | 6 |
7 #include "chrome/browser/ui/ash/keyboard_ui_service.h" | 7 #include "chrome/browser/ui/ash/keyboard_ui_service.h" |
8 #include "mojo/shell/public/cpp/connection.h" | 8 #include "services/shell/public/cpp/connection.h" |
9 | 9 |
10 namespace chromeos { | 10 namespace chromeos { |
11 | 11 |
12 ChromeInterfaceFactory::ChromeInterfaceFactory() {} | 12 ChromeInterfaceFactory::ChromeInterfaceFactory() {} |
13 ChromeInterfaceFactory::~ChromeInterfaceFactory() {} | 13 ChromeInterfaceFactory::~ChromeInterfaceFactory() {} |
14 | 14 |
15 bool ChromeInterfaceFactory::AcceptConnection(mojo::Connection* connection) { | 15 bool ChromeInterfaceFactory::AcceptConnection(mojo::Connection* connection) { |
16 connection->AddInterface(this); | 16 connection->AddInterface(this); |
17 return true; | 17 return true; |
18 } | 18 } |
19 | 19 |
20 void ChromeInterfaceFactory::Create( | 20 void ChromeInterfaceFactory::Create( |
21 mojo::Connection* connection, | 21 mojo::Connection* connection, |
22 mojo::InterfaceRequest<keyboard::mojom::Keyboard> request) { | 22 mojo::InterfaceRequest<keyboard::mojom::Keyboard> request) { |
23 if (!keyboard_ui_service_) | 23 if (!keyboard_ui_service_) |
24 keyboard_ui_service_.reset(new KeyboardUIService); | 24 keyboard_ui_service_.reset(new KeyboardUIService); |
25 keyboard_bindings_.AddBinding(keyboard_ui_service_.get(), std::move(request)); | 25 keyboard_bindings_.AddBinding(keyboard_ui_service_.get(), std::move(request)); |
26 } | 26 } |
27 | 27 |
28 } // namespace chromeos | 28 } // namespace chromeos |
OLD | NEW |