#ifndef CONTENT_PUBLIC_BROWSER_WEB_UI_CONTROLLER_INTERFACE_BINDER_H_
#define CONTENT_PUBLIC_BROWSER_WEB_UI_CONTROLLER_INTERFACE_BINDER_H_
#include <type_traits>
#include "content/common/content_export.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_ui.h"
#include "content/public/browser/web_ui_controller.h"
#include "mojo/public/cpp/bindings/binder_map.h"
namespace content {
namespace internal {
template <typename Interface, int N, typename... Subclasses>
struct BinderHelper;
template <typename Interface, typename WebUIControllerSubclass, typename = void>
struct BinderTakesRenderFrameHost : std::false_type { … };
BinderTakesRenderFrameHost<Interface, WebUIControllerSubclass, decltype(std::declval<WebUIControllerSubclass>().BindInterface(std::declval<RenderFrameHost *>(), std::declval<mojo::PendingReceiver<Interface>>()))>;
template <typename Interface, typename WebUIControllerSubclass>
bool SafeDownCastAndBindInterface(RenderFrameHost* host,
mojo::PendingReceiver<Interface>& receiver) { … }
BinderHelper<Interface, N, std::tuple<Subclass, Subclasses...>>;
BinderHelper<Interface, 0, std::tuple<Subclass, Subclasses...>>;
void CONTENT_EXPORT ReceivedInvalidWebUIControllerMessage(RenderFrameHost* rfh);
}
template <typename Interface, typename... WebUIControllerSubclasses>
void RegisterWebUIControllerInterfaceBinder(
mojo::BinderMapWithContext<RenderFrameHost*>* map) { … }
}
#endif