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

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: proper deps. 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 "base/values.h"
9 #include "components/physical_web/data_source/physical_web_data_source.h"
10 #include "components/physical_web/data_source/physical_web_listener.h"
11
12 namespace ntp_snippets {
13
14 class FakePhysicalWebDataSource : public PhysicalWebDataSource {
15 public:
16 FakePhysicalWebDataSource();
17 ~FakePhysicalWebDataSource() override;
18
19 // PhysicalWebDataSource implementation.
20 void StartDiscovery(bool network_request_enabled) override;
21 void StopDiscovery() override;
22 std::unique_ptr<base::ListValue> GetMetadata() override;
23 bool HasUnresolvedDiscoveries() override;
24 void RegisterListener(PhysicalWebListener* physical_web_listener) override;
25 void UnregisterListener(PhysicalWebListener* physical_web_listener) override;
26
27 void SetMetadata(std::unique_ptr<base::ListValue> metadata);
28
29 private:
30 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.
31
32 DISALLOW_COPY_AND_ASSIGN(FakePhysicalWebDataSource);
33 };
34
35 } // namespace ntp_snippets
36
37 #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