Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: components/ntp_snippets/physical_web_pages/fake_physical_web_data_source.h

Issue 2517113005: [NTP::PhysicalWeb] Wire Physical Web provider to the data source. (Closed)
Patch Set: treib@ comment. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698