Chromium Code Reviews| 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_ |