| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_NTP_SNIPPETS_PHYSICAL_WEB_PAGES_FAKE_PHYSICAL_WEB_PAGE_DATA_S
OURCE_H_ |
| 6 #define COMPONENTS_NTP_SNIPPETS_PHYSICAL_WEB_PAGES_FAKE_PHYSICAL_WEB_PAGE_DATA_S
OURCE_H_ |
| 7 |
| 8 #include <memory> |
| 9 |
| 10 #include "base/values.h" |
| 11 #include "components/physical_web/data_source/physical_web_data_source.h" |
| 12 #include "components/physical_web/data_source/physical_web_listener.h" |
| 13 |
| 14 namespace ntp_snippets { |
| 15 |
| 16 class FakePhysicalWebDataSource : public PhysicalWebDataSource { |
| 17 public: |
| 18 FakePhysicalWebDataSource(); |
| 19 ~FakePhysicalWebDataSource() override; |
| 20 |
| 21 // PhysicalWebDataSource implementation. |
| 22 void StartDiscovery(bool network_request_enabled) override; |
| 23 void StopDiscovery() override; |
| 24 std::unique_ptr<base::ListValue> GetMetadata() override; |
| 25 bool HasUnresolvedDiscoveries() override; |
| 26 void RegisterListener(PhysicalWebListener* physical_web_listener) override; |
| 27 void UnregisterListener(PhysicalWebListener* physical_web_listener) override; |
| 28 |
| 29 void SetMetadata(std::unique_ptr<base::ListValue> metadata); |
| 30 |
| 31 private: |
| 32 std::unique_ptr<base::ListValue> metadata_; |
| 33 |
| 34 DISALLOW_COPY_AND_ASSIGN(FakePhysicalWebDataSource); |
| 35 }; |
| 36 |
| 37 } // namespace ntp_snippets |
| 38 |
| 39 #endif // COMPONENTS_NTP_SNIPPETS_PHYSICAL_WEB_PAGES_FAKE_PHYSICAL_WEB_PAGE_DAT
A_SOURCE_H_ |
| OLD | NEW |