Commit 02badc14 authored by Mario Sanchez Prada's avatar Mario Sanchez Prada Committed by Commit Bot

Remove InterfaceRegistry & InterfaceProvider's methods for old Mojo types

We no longer need to have these templated methods declared as we can now
rely on the new Mojo types, so let's drop them to reduce the amount of
references to the old types inside Blink.

Bug: 955171, 978694
Change-Id: I7cfc4987ae41916b678e071e13e892f52b014913
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1832205Reviewed-by: default avatarKen Rockot <rockot@google.com>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#701739}
parent 017bd074
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_INTERFACE_PROVIDER_H_ #ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_INTERFACE_PROVIDER_H_
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_INTERFACE_PROVIDER_H_ #define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_INTERFACE_PROVIDER_H_
#include "mojo/public/cpp/bindings/interface_request.h"
#include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/system/message_pipe.h" #include "mojo/public/cpp/system/message_pipe.h"
#include "third_party/blink/public/platform/web_common.h" #include "third_party/blink/public/platform/web_common.h"
...@@ -20,11 +19,6 @@ class BLINK_PLATFORM_EXPORT InterfaceProvider { ...@@ -20,11 +19,6 @@ class BLINK_PLATFORM_EXPORT InterfaceProvider {
virtual void GetInterface(const char* name, virtual void GetInterface(const char* name,
mojo::ScopedMessagePipeHandle) = 0; mojo::ScopedMessagePipeHandle) = 0;
template <typename Interface>
void GetInterface(mojo::InterfaceRequest<Interface> ptr) {
GetInterface(Interface::Name_, ptr.PassMessagePipe());
}
template <typename Interface> template <typename Interface>
void GetInterface(mojo::PendingReceiver<Interface> receiver) { void GetInterface(mojo::PendingReceiver<Interface> receiver) {
GetInterface(Interface::Name_, receiver.PassPipe()); GetInterface(Interface::Name_, receiver.PassPipe());
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
#include "third_party/blink/public/platform/web_common.h" #include "third_party/blink/public/platform/web_common.h"
#if INSIDE_BLINK #if INSIDE_BLINK
#include "mojo/public/cpp/bindings/associated_interface_request.h"
#include "mojo/public/cpp/bindings/interface_request.h"
#include "mojo/public/cpp/bindings/pending_associated_receiver.h" #include "mojo/public/cpp/bindings/pending_associated_receiver.h"
#include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/pending_receiver.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_functional.h" // nogncheck #include "third_party/blink/renderer/platform/wtf/cross_thread_functional.h" // nogncheck
...@@ -47,17 +45,6 @@ class BLINK_PLATFORM_EXPORT InterfaceRegistry { ...@@ -47,17 +45,6 @@ class BLINK_PLATFORM_EXPORT InterfaceRegistry {
static InterfaceRegistry* GetEmptyInterfaceRegistry(); static InterfaceRegistry* GetEmptyInterfaceRegistry();
#if INSIDE_BLINK #if INSIDE_BLINK
template <typename Interface>
void AddInterface(
base::RepeatingCallback<void(mojo::InterfaceRequest<Interface>)>
factory) {
AddInterface(
Interface::Name_,
WTF::BindRepeating(&InterfaceRegistry::ForwardToInterfaceFactory<
mojo::InterfaceRequest<Interface>>,
std::move(factory)));
}
template <typename Interface> template <typename Interface>
void AddInterface( void AddInterface(
base::RepeatingCallback<void(mojo::PendingReceiver<Interface>)> factory) { base::RepeatingCallback<void(mojo::PendingReceiver<Interface>)> factory) {
...@@ -68,18 +55,6 @@ class BLINK_PLATFORM_EXPORT InterfaceRegistry { ...@@ -68,18 +55,6 @@ class BLINK_PLATFORM_EXPORT InterfaceRegistry {
std::move(factory))); std::move(factory)));
} }
template <typename Interface>
void AddInterface(WTF::CrossThreadRepeatingFunction<
void(mojo::InterfaceRequest<Interface>)> factory,
scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
AddInterface(Interface::Name_,
ConvertToBaseCallback(CrossThreadBind(
&InterfaceRegistry::ForwardToCrossThreadInterfaceFactory<
mojo::InterfaceRequest<Interface>>,
std::move(factory))),
std::move(task_runner));
}
template <typename Interface> template <typename Interface>
void AddInterface(WTF::CrossThreadRepeatingFunction< void AddInterface(WTF::CrossThreadRepeatingFunction<
void(mojo::PendingReceiver<Interface>)> factory, void(mojo::PendingReceiver<Interface>)> factory,
...@@ -92,18 +67,6 @@ class BLINK_PLATFORM_EXPORT InterfaceRegistry { ...@@ -92,18 +67,6 @@ class BLINK_PLATFORM_EXPORT InterfaceRegistry {
std::move(task_runner)); std::move(task_runner));
} }
template <typename Interface>
void AddAssociatedInterface(
base::RepeatingCallback<void(mojo::AssociatedInterfaceRequest<Interface>)>
factory) {
AddAssociatedInterface(
Interface::Name_,
WTF::BindRepeating(
&InterfaceRegistry::ForwardToAssociatedInterfaceFactory<
mojo::AssociatedInterfaceRequest<Interface>>,
std::move(factory)));
}
template <typename Interface> template <typename Interface>
void AddAssociatedInterface( void AddAssociatedInterface(
base::RepeatingCallback<void(mojo::PendingAssociatedReceiver<Interface>)> base::RepeatingCallback<void(mojo::PendingAssociatedReceiver<Interface>)>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment