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 "public/platform/Connector.h" |
5 #include "public/platform/InterfaceProvider.h" | 6 #include "public/platform/InterfaceProvider.h" |
6 | 7 |
7 #include "wtf/StdLibExtras.h" | 8 #include "wtf/StdLibExtras.h" |
8 | 9 |
9 namespace blink { | 10 namespace blink { |
10 namespace { | 11 namespace { |
11 | 12 |
| 13 class EmptyConnector : public Connector { |
| 14 void bindInterface(const char* serviceName, |
| 15 const char* interfaceName, |
| 16 mojo::ScopedMessagePipeHandle) override {} |
| 17 }; |
| 18 |
12 class EmptyInterfaceProvider : public InterfaceProvider { | 19 class EmptyInterfaceProvider : public InterfaceProvider { |
13 void getInterface(const char* name, mojo::ScopedMessagePipeHandle) override {} | 20 void getInterface(const char* name, mojo::ScopedMessagePipeHandle) override {} |
14 }; | 21 }; |
15 } | 22 } |
16 | 23 |
| 24 Connector* Connector::getEmptyConnector() { |
| 25 DEFINE_STATIC_LOCAL(EmptyConnector, emptyConnector, ()); |
| 26 return &emptyConnector; |
| 27 } |
| 28 |
17 InterfaceProvider* InterfaceProvider::getEmptyInterfaceProvider() { | 29 InterfaceProvider* InterfaceProvider::getEmptyInterfaceProvider() { |
18 DEFINE_STATIC_LOCAL(EmptyInterfaceProvider, emptyInterfaceProvider, ()); | 30 DEFINE_STATIC_LOCAL(EmptyInterfaceProvider, emptyInterfaceProvider, ()); |
19 return &emptyInterfaceProvider; | 31 return &emptyInterfaceProvider; |
20 } | 32 } |
21 } | 33 } |
OLD | NEW |