blob: 136e5500fcacecf96ffe7e5406b226d8e0973f0c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
|