| Index: content/public/test/fake_associated_interface_provider_impl.h
|
| diff --git a/content/public/test/fake_associated_interface_provider_impl.h b/content/public/test/fake_associated_interface_provider_impl.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..29dc4cdaced5e71916cd1883335eab95cf68fe80
|
| --- /dev/null
|
| +++ b/content/public/test/fake_associated_interface_provider_impl.h
|
| @@ -0,0 +1,45 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CONTENT_PUBLIC_TEST_FAKE_ASSOCIATED_INTERFACE_PROVIDER_IMPL_H_
|
| +#define CONTENT_PUBLIC_TEST_FAKE_ASSOCIATED_INTERFACE_PROVIDER_IMPL_H_
|
| +
|
| +#include "content/public/common/associated_interface_provider.h"
|
| +
|
| +#include "base/macros.h"
|
| +#include "base/memory/ref_counted.h"
|
| +#include "content/public/test/foo_interface.mojom.h"
|
| +#include "mojo/public/cpp/bindings/associated_group_controller.h"
|
| +
|
| +namespace content {
|
| +
|
| +class FakeAssociatedInterfaceProviderImpl : public AssociatedInterfaceProvider {
|
| + public:
|
| + FakeAssociatedInterfaceProviderImpl();
|
| + ~FakeAssociatedInterfaceProviderImpl() override;
|
| +
|
| + // AssociatedInterfaceProvider:
|
| + void GetInterface(const std::string& name,
|
| + mojo::ScopedInterfaceEndpointHandle handle) override;
|
| + mojo::AssociatedGroup* GetAssociatedGroup() override;
|
| + void OverrideBinderForTesting(
|
| + const std::string& name,
|
| + const base::Callback<void(mojo::ScopedInterfaceEndpointHandle)>& binder)
|
| + override;
|
| +
|
| + private:
|
| + mojom::FooInterfaceAssociatedPtr foo_ptr_;
|
| + scoped_refptr<mojo::AssociatedGroupController> remote_controller_;
|
| +
|
| + using BinderMap =
|
| + std::map<std::string,
|
| + base::Callback<void(mojo::ScopedInterfaceEndpointHandle)>>;
|
| + BinderMap binders_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(FakeAssociatedInterfaceProviderImpl);
|
| +};
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_PUBLIC_TEST_FAKE_ASSOCIATED_INTERFACE_PROVIDER_IMPL_H_
|
|
|