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

Unified Diff: content/renderer/p2p/network_list_manager.h

Issue 536133003: MergeNetworkList can't group address under the same interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change the prefix length type from unsigned int to uint32 Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/p2p/ipc_network_manager_unittest.cc ('k') | content/renderer/p2p/socket_dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/p2p/network_list_manager.h
diff --git a/content/renderer/p2p/network_list_manager.h b/content/renderer/p2p/network_list_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..c0e0f58bdae37d2cbbfcb5193fe68ed34195813f
--- /dev/null
+++ b/content/renderer/p2p/network_list_manager.h
@@ -0,0 +1,38 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// NetworkListManager interface is introduced to enable unit test on
+// IpcNetworkManager such that it doesn't depend on implementation of
+// P2PSocketDispatcher.
+
+#ifndef CONTENT_RENDERER_P2P_NETWORK_LIST_MANAGER_H_
+#define CONTENT_RENDERER_P2P_NETWORK_LIST_MANAGER_H_
+
+namespace content {
+
+class NetworkListObserver;
+
+class CONTENT_EXPORT NetworkListManager {
+ public:
+ // Add a new network list observer. Each observer is called
+ // immidiately after it is registered and then later whenever
+ // network configuration changes. Can be called on any thread. The
+ // observer is always called on the thread it was added.
+ virtual void AddNetworkListObserver(
+ NetworkListObserver* network_list_observer) = 0;
+
+ // Removes network list observer. Must be called on the thread on
+ // which the observer was added.
+ virtual void RemoveNetworkListObserver(
+ NetworkListObserver* network_list_observer) = 0;
+
+ protected:
+ // Marked as protected to prevent explicit deletion, as
+ // P2PSocketDispatcher is not owned by IpcNetworkManager.
+ virtual ~NetworkListManager() {}
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_P2P_NETWORK_LIST_MANAGER_H_
« no previous file with comments | « content/renderer/p2p/ipc_network_manager_unittest.cc ('k') | content/renderer/p2p/socket_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698