From 78b761aa5c43e4caf514617a38d61f65539b38d6 Mon Sep 17 00:00:00 2001 From: "brettw@chromium.org" Date: Tue, 12 Jul 2011 22:58:49 +0000 Subject: Add a network state notification interface to Pepper. Some plugins will need to know when the network goes up and down to do reconnection. Review URL: http://codereview.chromium.org/7345020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92256 0039d316-1c4b-4281-b951-d872f2087c98 --- ppapi/c/dev/ppp_network_state_dev.h | 27 +++++++++++++++++++++++++++ ppapi/ppapi_cpp.gypi | 1 + 2 files changed, 28 insertions(+) create mode 100644 ppapi/c/dev/ppp_network_state_dev.h (limited to 'ppapi') diff --git a/ppapi/c/dev/ppp_network_state_dev.h b/ppapi/c/dev/ppp_network_state_dev.h new file mode 100644 index 0000000..cb4b15a --- /dev/null +++ b/ppapi/c/dev/ppp_network_state_dev.h @@ -0,0 +1,27 @@ +/* Copyright (c) 2011 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_C_DEV_PPP_NETWORK_STATE_DEV_H_ +#define PPAPI_C_DEV_PPP_NETWORK_STATE_DEV_H_ + +/** + * @file + * This file defines the PPP_NetworkState interface. + */ + +#define PPP_NETWORK_STATE_DEV_INTERFACE "PPP_NetworkState(Dev);0.1" + +struct PPP_NetworkState_Dev { + /** + * Notification that the online state has changed for the user's network. + * This will change as a result of a network cable being plugged or + * unplugged, WiFi connections going up and down, or other events. + * + * Note that being "online" isn't a guarantee that any particular connections + * will succeed. + */ + void (*SetOnLine)(PP_Bool is_online); +}; + +#endif // PPAPI_C_DEV_PPP_NETWORK_STATE_DEV_H_ diff --git a/ppapi/ppapi_cpp.gypi b/ppapi/ppapi_cpp.gypi index 5f6b0b0..d722695 100644 --- a/ppapi/ppapi_cpp.gypi +++ b/ppapi/ppapi_cpp.gypi @@ -82,6 +82,7 @@ 'c/dev/ppp_cursor_control_dev.h', 'c/dev/ppp_find_dev.h', 'c/dev/ppp_graphics_3d_dev.h', + 'c/dev/ppp_network_state_dev.h', 'c/dev/ppp_scrollbar_dev.h', 'c/dev/ppp_selection_dev.h', 'c/dev/ppp_printing_dev.h', -- cgit v1.1