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

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

Issue 919943002: Remove extensions::ServiceRegistrationManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 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 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 "content/public/browser/browser_thread.h"
8 #include "device/serial/serial_service_impl.h"
9
10 namespace extensions {
11 namespace {
12 const base::Callback<void(
13 mojo::InterfaceRequest<device::serial::SerialService>)>*
14 g_serial_service_test_factory = nullptr;
15 }
16
17 void BindToSerialServiceRequest(
18 mojo::InterfaceRequest<device::serial::SerialService> request) {
19 if (g_serial_service_test_factory) {
20 g_serial_service_test_factory->Run(request.Pass());
21 return;
22 }
23 device::SerialServiceImpl::CreateOnMessageLoop(
24 content::BrowserThread::GetMessageLoopProxyForThread(
25 content::BrowserThread::FILE),
26 content::BrowserThread::GetMessageLoopProxyForThread(
27 content::BrowserThread::IO),
28 content::BrowserThread::GetMessageLoopProxyForThread(
29 content::BrowserThread::UI),
30 request.Pass());
31 }
32
33 void SetSerialServiceFactoryForTest(const base::Callback<
34 void(mojo::InterfaceRequest<device::serial::SerialService>)>* callback) {
35 g_serial_service_test_factory = callback;
36 }
37
38 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/serial/serial_service_factory.h ('k') | extensions/browser/extension_web_contents_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698