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

Unified Diff: ppapi/utility/network_list_observer.h

Issue 9696051: Add NetworkListObserver utility class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | « ppapi/tests/test_network_monitor_private.cc ('k') | ppapi/utility/network_list_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/utility/network_list_observer.h
diff --git a/ppapi/utility/network_list_observer.h b/ppapi/utility/network_list_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..698db2b1348af2a6d94d2d6b73ba509cc3eeec5f
--- /dev/null
+++ b/ppapi/utility/network_list_observer.h
@@ -0,0 +1,30 @@
+// Copyright (c) 2012 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.
+
+#ifndef PPAPI_UTILITY_NETWORK_LIST_OBSERVER_H_
+#define PPAPI_UTILITY_NETWORK_LIST_OBSERVER_H_
dmichael (off chromium) 2012/03/15 20:16:58 It should probably go in a ppapi/utility/private d
Sergey Ulanov 2012/03/15 23:44:08 Done.
+
+#include "ppapi/cpp/private/network_monitor_private.h"
+
+namespace pp {
+
+class NetworkListPrivate;
+
+class NetworkListObserver {
dmichael (off chromium) 2012/03/15 20:16:58 Please add documentation.
Sergey Ulanov 2012/03/15 23:44:08 Done.
+ public:
+ NetworkListObserver(const InstanceHandle& instance);
dmichael (off chromium) 2012/03/15 20:16:58 explicit
Sergey Ulanov 2012/03/15 23:44:08 Done.
+ virtual ~NetworkListObserver();
+
+ virtual void OnNetworkList(const NetworkListPrivate& list) = 0;
dmichael (off chromium) 2012/03/15 20:16:58 What about OnReceiveNetworkList? It would be nice
Sergey Ulanov 2012/03/15 23:44:08 Renamed to OnNetworkListChanged()
+
+ private:
+ static void NetworkListCallbackHandler(void* user_data,
+ PP_Resource list_resource);
+
+ NetworkMonitorPrivate monitor_;
+};
+
+} // namespace pp
+
+#endif // PPAPI_UTILITY_NETWORK_LIST_OBSERVER_H_
« no previous file with comments | « ppapi/tests/test_network_monitor_private.cc ('k') | ppapi/utility/network_list_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698