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