OLD | NEW |
---|---|
(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 // WeakPtrFactory to use for callbacks. | |
46 base::WeakPtrFactory<ArcNetHostImpl> weak_factory_; | |
dcheng
2016/01/25 23:35:32
This appears to be unused.
| |
47 | |
48 DISALLOW_COPY_AND_ASSIGN(ArcNetHostImpl); | |
49 }; | |
50 | |
51 } // namespace arc | |
52 | |
53 #endif // COMPONENTS_ARC_NET_ARC_NET_HOST_IMPL_H_ | |
OLD | NEW |