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

Side by Side Diff: components/arc/net/arc_net_host_impl.h

Issue 1572483002: Implement OnGetNetworks for net.mojom (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove weak_factory_ Created 4 years, 11 months 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
« no previous file with comments | « components/arc/net/DEPS ('k') | components/arc/net/arc_net_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 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_ARC_NET_ARC_NET_HOST_IMPL_H_
6 #define COMPONENTS_ARC_NET_ARC_NET_HOST_IMPL_H_
7
8 #include <stdint.h>
9 #include <string>
10 #include <vector>
11
12 #include "base/files/scoped_file.h"
13 #include "base/macros.h"
14 #include "base/threading/thread_checker.h"
15 #include "components/arc/arc_bridge_service.h"
16 #include "components/arc/arc_service.h"
17 #include "components/arc/common/net.mojom.h"
18 #include "mojo/public/cpp/bindings/binding.h"
19
20 namespace arc {
21
22 class ArcBridgeService;
23
24 // Private implementation of ArcNetHost.
25 class ArcNetHostImpl : public ArcService,
26 public ArcBridgeService::Observer,
27 public NetHost {
28 public:
29 // The constructor will register an Observer with ArcBridgeService.
30 explicit ArcNetHostImpl(ArcBridgeService* arc_bridge_service);
31 ~ArcNetHostImpl() override;
32
33 // Called when a GetNetworks call is sent from ARC.
34 void GetNetworks(bool configured_only,
35 bool visible_only,
36 const GetNetworksCallback& callback) override;
37
38 // Overridden from ArcBridgeService::Observer:
39 void OnNetInstanceReady() override;
40
41 private:
42 base::ThreadChecker thread_checker_;
43 mojo::Binding<arc::NetHost> binding_;
44
45 DISALLOW_COPY_AND_ASSIGN(ArcNetHostImpl);
46 };
47
48 } // namespace arc
49
50 #endif // COMPONENTS_ARC_NET_ARC_NET_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « components/arc/net/DEPS ('k') | components/arc/net/arc_net_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698