Chromium Code Reviews| 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..3dc95a6d99573e29272cff643a8c0db7eac54c84 |
| --- /dev/null |
| +++ b/components/ntp_snippets/physical_web_pages/fake_physical_web_data_source.h |
| @@ -0,0 +1,37 @@ |
| +// 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 "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_; |
|
Marc Treib
2016/11/23 09:47:52
nit: #include <memory>
vitaliii
2016/11/23 14:16:52
Done.
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(FakePhysicalWebDataSource); |
| +}; |
| + |
| +} // namespace ntp_snippets |
| + |
| +#endif // COMPONENTS_NTP_SNIPPETS_PHYSICAL_WEB_PAGES_FAKE_PHYSICAL_WEB_PAGE_DATA_SOURCE_H_ |