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

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

Issue 1925083003: Notify ARC of default network changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wifi-change
Patch Set: incorporate code review feedback Created 4 years, 7 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/common/net.mojom ('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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_ARC_NET_ARC_NET_HOST_IMPL_H_ 5 #ifndef COMPONENTS_ARC_NET_ARC_NET_HOST_IMPL_H_
6 #define COMPONENTS_ARC_NET_ARC_NET_HOST_IMPL_H_ 6 #define COMPONENTS_ARC_NET_ARC_NET_HOST_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/files/scoped_file.h" 12 #include "base/files/scoped_file.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/weak_ptr.h"
14 #include "base/threading/thread_checker.h" 15 #include "base/threading/thread_checker.h"
16 #include "base/values.h"
stevenjb 2016/05/18 23:28:06 Instead forward declare DictionaryValue
Kevin Cernekee 2016/05/18 23:39:30 Done.
15 #include "chromeos/network/network_state_handler_observer.h" 17 #include "chromeos/network/network_state_handler_observer.h"
16 #include "components/arc/arc_bridge_service.h" 18 #include "components/arc/arc_bridge_service.h"
17 #include "components/arc/arc_service.h" 19 #include "components/arc/arc_service.h"
18 #include "components/arc/common/net.mojom.h" 20 #include "components/arc/common/net.mojom.h"
19 #include "mojo/public/cpp/bindings/binding.h" 21 #include "mojo/public/cpp/bindings/binding.h"
20 22
21 namespace arc { 23 namespace arc {
22 24
23 class ArcBridgeService; 25 class ArcBridgeService;
24 26
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 61
60 void StartConnect(const mojo::String& guid, 62 void StartConnect(const mojo::String& guid,
61 const StartConnectCallback& callback) override; 63 const StartConnectCallback& callback) override;
62 64
63 void StartDisconnect(const mojo::String& guid, 65 void StartDisconnect(const mojo::String& guid,
64 const StartDisconnectCallback& callback) override; 66 const StartDisconnectCallback& callback) override;
65 67
66 // Overriden from chromeos::NetworkStateHandlerObserver. 68 // Overriden from chromeos::NetworkStateHandlerObserver.
67 void ScanCompleted(const chromeos::DeviceState* /*unused*/) override; 69 void ScanCompleted(const chromeos::DeviceState* /*unused*/) override;
68 void OnShuttingDown() override; 70 void OnShuttingDown() override;
71 void DefaultNetworkChanged(const chromeos::NetworkState* network) override;
72 void GetDefaultNetwork(const GetDefaultNetworkCallback& callback) override;
69 73
70 // Overridden from ArcBridgeService::Observer: 74 // Overridden from ArcBridgeService::Observer:
71 void OnNetInstanceReady() override; 75 void OnNetInstanceReady() override;
72 76
73 private: 77 private:
78 void DefaultNetworkSuccessCallback(const std::string& service_path,
79 const base::DictionaryValue& dictionary);
74 base::ThreadChecker thread_checker_; 80 base::ThreadChecker thread_checker_;
75 mojo::Binding<arc::mojom::NetHost> binding_; 81 mojo::Binding<arc::mojom::NetHost> binding_;
82 base::WeakPtrFactory<ArcNetHostImpl> weak_factory_;
76 83
77 DISALLOW_COPY_AND_ASSIGN(ArcNetHostImpl); 84 DISALLOW_COPY_AND_ASSIGN(ArcNetHostImpl);
78 }; 85 };
79 86
80 } // namespace arc 87 } // namespace arc
81 88
82 #endif // COMPONENTS_ARC_NET_ARC_NET_HOST_IMPL_H_ 89 #endif // COMPONENTS_ARC_NET_ARC_NET_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « components/arc/common/net.mojom ('k') | components/arc/net/arc_net_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698