summaryrefslogtreecommitdiffstats
path: root/ppapi/utility
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-20 23:46:41 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-20 23:46:41 +0000
commit6de9070e8a48d7faf1d723c5fd40ed29222c7125 (patch)
treea129ec5f371d9cd072053313c56b96b051f9706c /ppapi/utility
parent061239ca0a4d26d8d88ca2db94cb1a330dae4928 (diff)
downloadchromium_src-6de9070e8a48d7faf1d723c5fd40ed29222c7125.zip
chromium_src-6de9070e8a48d7faf1d723c5fd40ed29222c7125.tar.gz
chromium_src-6de9070e8a48d7faf1d723c5fd40ed29222c7125.tar.bz2
Revert 127797 - Add NetworkListObserver utility class.
BUG=114808 Review URL: http://codereview.chromium.org/9696051 TBR=sergeyu@chromium.org Review URL: https://chromiumcodereview.appspot.com/9801004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127837 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/utility')
-rw-r--r--ppapi/utility/private/network_list_observer_private.cc34
-rw-r--r--ppapi/utility/private/network_list_observer_private.h42
2 files changed, 0 insertions, 76 deletions
diff --git a/ppapi/utility/private/network_list_observer_private.cc b/ppapi/utility/private/network_list_observer_private.cc
deleted file mode 100644
index f41e81b..0000000
--- a/ppapi/utility/private/network_list_observer_private.cc
+++ /dev/null
@@ -1,34 +0,0 @@
-// 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.
-
-#include "ppapi/utility/private/network_list_observer_private.h"
-
-#include "ppapi/cpp/private/network_list_private.h"
-#include "ppapi/cpp/module.h"
-
-namespace pp {
-
-NetworkListObserverPrivate::NetworkListObserverPrivate(
- const InstanceHandle& instance)
- : PP_ALLOW_THIS_IN_INITIALIZER_LIST(
- monitor_(instance,
- &NetworkListObserverPrivate::NetworkListCallbackHandler,
- this)) {
-}
-
-NetworkListObserverPrivate::~NetworkListObserverPrivate() {
-}
-
-// static
-void NetworkListObserverPrivate::NetworkListCallbackHandler(
- void* user_data,
- PP_Resource list_resource) {
- NetworkListObserverPrivate* object =
- static_cast<NetworkListObserverPrivate*>(user_data);
- NetworkListPrivate list(list_resource);
- object->OnNetworkListChanged(list);
- Module::Get()->core()->ReleaseResource(list_resource);
-}
-
-} // namespace pp
diff --git a/ppapi/utility/private/network_list_observer_private.h b/ppapi/utility/private/network_list_observer_private.h
deleted file mode 100644
index 22e1e78..0000000
--- a/ppapi/utility/private/network_list_observer_private.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// 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_PRIVATE_NETWORK_LIST_OBSERVER_H_
-#define PPAPI_UTILITY_PRIVATE_NETWORK_LIST_OBSERVER_H_
-
-#include "ppapi/cpp/private/network_monitor_private.h"
-
-namespace pp {
-
-class NetworkListPrivate;
-
-/// <code>NetworkListObserver</code> is a wrapper for
-/// <code>pp::NetworkMonitorPrivate</code> that makes it easier to
-/// handle network list update notifications. A child class must
-/// implement the <code>OnNetworkListChanged()</code> method. That
-/// method will be called once after the object is created and then
-/// every time network configuration changes.
-class NetworkListObserverPrivate {
- public:
- explicit NetworkListObserverPrivate(const InstanceHandle& instance);
- virtual ~NetworkListObserverPrivate();
-
- protected:
- /// Called once after this object is created and later every time
- /// network configuration changes. Child classes must implement this
- /// method.
- ///
- /// @param[in] list The current list of network interfaces.
- virtual void OnNetworkListChanged(const NetworkListPrivate& list) = 0;
-
- private:
- static void NetworkListCallbackHandler(void* user_data,
- PP_Resource list_resource);
-
- NetworkMonitorPrivate monitor_;
-};
-
-} // namespace pp
-
-#endif // PPAPI_UTILITY_PRIVATE_NETWORK_LIST_OBSERVER_H_