| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "content/renderer/mojo/blink_interface_registry_impl.h" |
| 6 |
| 7 #include <utility> |
| 8 |
| 9 #include "base/bind.h" |
| 10 #include "mojo/public/cpp/system/message_pipe.h" |
| 11 #include "services/shell/public/cpp/interface_registry.h" |
| 12 |
| 13 namespace content { |
| 14 |
| 15 BlinkInterfaceRegistryImpl::BlinkInterfaceRegistryImpl( |
| 16 base::WeakPtr<shell::InterfaceRegistry> interface_registry) |
| 17 : interface_registry_(interface_registry) {} |
| 18 |
| 19 BlinkInterfaceRegistryImpl::~BlinkInterfaceRegistryImpl() = default; |
| 20 |
| 21 void BlinkInterfaceRegistryImpl::addInterface( |
| 22 const char* name, |
| 23 const blink::InterfaceFactory& factory) { |
| 24 if (!interface_registry_) |
| 25 return; |
| 26 |
| 27 interface_registry_->AddInterface(name, factory); |
| 28 } |
| 29 |
| 30 } // namespace content |
| OLD | NEW |