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.
5 #include "ppapi/cpp/private/network_monitor_private.h"
7 #include "ppapi/cpp/instance.h"
8 #include "ppapi/cpp/module_impl.h"
14 template <> const char* interface_name
<PPB_NetworkMonitor_Private
>() {
15 return PPB_NETWORKMONITOR_PRIVATE_INTERFACE
;
20 NetworkMonitorPrivate::NetworkMonitorPrivate(
21 const InstanceHandle
& instance
,
22 PPB_NetworkMonitor_Callback callback
,
24 if (has_interface
<PPB_NetworkMonitor_Private
>()) {
25 PassRefFromConstructor(get_interface
<PPB_NetworkMonitor_Private
>()->Create(
26 instance
.pp_instance(), callback
, user_data
));
31 bool NetworkMonitorPrivate::IsAvailable() {
32 return has_interface
<PPB_NetworkMonitor_Private
>();