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

Side by Side Diff: extensions/browser/api/serial/serial_service_factory.cc

Issue 2410743002: Remove the mojo serial interfaces and related infrastructure. (Closed)
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 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 "extensions/browser/api/serial/serial_service_factory.h"
6
7 #include <utility>
8
9 #include "content/public/browser/browser_thread.h"
10 #include "device/serial/serial_service_impl.h"
11
12 namespace extensions {
13 namespace {
14 const base::Callback<void(
15 mojo::InterfaceRequest<device::serial::SerialService>)>*
16 g_serial_service_test_factory = nullptr;
17 }
18
19 void BindToSerialServiceRequest(
20 mojo::InterfaceRequest<device::serial::SerialService> request) {
21 if (g_serial_service_test_factory) {
22 g_serial_service_test_factory->Run(std::move(request));
23 return;
24 }
25 device::SerialServiceImpl::CreateOnMessageLoop(
26 content::BrowserThread::GetTaskRunnerForThread(
27 content::BrowserThread::FILE),
28 content::BrowserThread::GetTaskRunnerForThread(
29 content::BrowserThread::IO),
30 content::BrowserThread::GetTaskRunnerForThread(
31 content::BrowserThread::UI),
32 std::move(request));
33 }
34
35 void SetSerialServiceFactoryForTest(const base::Callback<
36 void(mojo::InterfaceRequest<device::serial::SerialService>)>* callback) {
37 g_serial_service_test_factory = callback;
38 }
39
40 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/serial/serial_service_factory.h ('k') | extensions/browser/mojo/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698