| Index: components/ntp_snippets/physical_web_pages/fake_physical_web_data_source.h
|
| diff --git a/components/ntp_snippets/physical_web_pages/fake_physical_web_data_source.h b/components/ntp_snippets/physical_web_pages/fake_physical_web_data_source.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d9aed3ef37af80ffca308296c619e05d38b938a6
|
| --- /dev/null
|
| +++ b/components/ntp_snippets/physical_web_pages/fake_physical_web_data_source.h
|
| @@ -0,0 +1,39 @@
|
| +// 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 COMPONENTS_NTP_SNIPPETS_PHYSICAL_WEB_PAGES_FAKE_PHYSICAL_WEB_PAGE_DATA_SOURCE_H_
|
| +#define COMPONENTS_NTP_SNIPPETS_PHYSICAL_WEB_PAGES_FAKE_PHYSICAL_WEB_PAGE_DATA_SOURCE_H_
|
| +
|
| +#include <memory>
|
| +
|
| +#include "base/values.h"
|
| +#include "components/physical_web/data_source/physical_web_data_source.h"
|
| +#include "components/physical_web/data_source/physical_web_listener.h"
|
| +
|
| +namespace ntp_snippets {
|
| +
|
| +class FakePhysicalWebDataSource : public PhysicalWebDataSource {
|
| + public:
|
| + FakePhysicalWebDataSource();
|
| + ~FakePhysicalWebDataSource() override;
|
| +
|
| + // PhysicalWebDataSource implementation.
|
| + void StartDiscovery(bool network_request_enabled) override;
|
| + void StopDiscovery() override;
|
| + std::unique_ptr<base::ListValue> GetMetadata() override;
|
| + bool HasUnresolvedDiscoveries() override;
|
| + void RegisterListener(PhysicalWebListener* physical_web_listener) override;
|
| + void UnregisterListener(PhysicalWebListener* physical_web_listener) override;
|
| +
|
| + void SetMetadata(std::unique_ptr<base::ListValue> metadata);
|
| +
|
| + private:
|
| + std::unique_ptr<base::ListValue> metadata_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(FakePhysicalWebDataSource);
|
| +};
|
| +
|
| +} // namespace ntp_snippets
|
| +
|
| +#endif // COMPONENTS_NTP_SNIPPETS_PHYSICAL_WEB_PAGES_FAKE_PHYSICAL_WEB_PAGE_DATA_SOURCE_H_
|
|
|