OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 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 WEBKIT_PLUGINS_PPAPI_PPB_NETWORK_MONITOR_PRIVATE_IMPL_H_ |
| 6 #define WEBKIT_PLUGINS_PPAPI_PPB_NETWORK_MONITOR_PRIVATE_IMPL_H_ |
| 7 |
| 8 #include <list> |
| 9 #include <string> |
| 10 |
| 11 #include "base/basictypes.h" |
| 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "ppapi/c/private/ppb_network_monitor_private.h" |
| 14 #include "ppapi/shared_impl/resource.h" |
| 15 #include "ppapi/thunk/ppb_network_monitor_private_api.h" |
| 16 #include "webkit/glue/network_list_observer.h" |
| 17 #include "webkit/plugins/ppapi/plugin_delegate.h" |
| 18 |
| 19 namespace webkit { |
| 20 namespace ppapi { |
| 21 |
| 22 class PPB_NetworkMonitor_Private_Impl |
| 23 : public ::ppapi::Resource, |
| 24 public ::ppapi::thunk::PPB_NetworkMonitor_Private_API, |
| 25 public webkit_glue::NetworkListObserver { |
| 26 public: |
| 27 static PP_Resource Create(PP_Instance instance, |
| 28 PPB_NetworkMonitor_Callback callback, |
| 29 void* user_data); |
| 30 |
| 31 virtual ~PPB_NetworkMonitor_Private_Impl(); |
| 32 |
| 33 virtual ::ppapi::thunk::PPB_NetworkMonitor_Private_API* |
| 34 AsPPB_NetworkMonitor_Private_API() OVERRIDE; |
| 35 |
| 36 // NetworkListObserver interface. |
| 37 virtual void OnNetworkListChanged( |
| 38 const net::NetworkInterfaceList& list) OVERRIDE; |
| 39 |
| 40 private: |
| 41 PPB_NetworkMonitor_Private_Impl(PP_Instance instance, |
| 42 PPB_NetworkMonitor_Callback callback, |
| 43 void* user_data); |
| 44 |
| 45 bool Start(); |
| 46 |
| 47 PPB_NetworkMonitor_Callback callback_; |
| 48 void* user_data_; |
| 49 bool started_; |
| 50 |
| 51 DISALLOW_COPY_AND_ASSIGN(PPB_NetworkMonitor_Private_Impl); |
| 52 }; |
| 53 |
| 54 } // namespace ppapi |
| 55 } // namespace webkit |
| 56 |
| 57 #endif // WEBKIT_PLUGINS_PPAPI_PPB_NETWORK_MONITOR_PRIVATE_IMPL_H_ |
OLD | NEW |