diff options
author | apatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-24 21:17:43 +0000 |
---|---|---|
committer | apatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-24 21:17:43 +0000 |
commit | a7150972720d10eb13ec1461dcdd0836b86b2586 (patch) | |
tree | 89b3e5485df9d1baa4718ae3c5a76583af566f04 /gpu/np_utils/dynamic_np_object.cc | |
parent | eba9677e3ca98f6b968f1c5050141bf7b95d5421 (diff) | |
download | chromium_src-a7150972720d10eb13ec1461dcdd0836b86b2586.zip chromium_src-a7150972720d10eb13ec1461dcdd0836b86b2586.tar.gz chromium_src-a7150972720d10eb13ec1461dcdd0836b86b2586.tar.bz2 |
Reverting the rest of 32952
TEST=none
BUG=none
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32970 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/np_utils/dynamic_np_object.cc')
-rw-r--r-- | gpu/np_utils/dynamic_np_object.cc | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/gpu/np_utils/dynamic_np_object.cc b/gpu/np_utils/dynamic_np_object.cc deleted file mode 100644 index e037fdc..0000000 --- a/gpu/np_utils/dynamic_np_object.cc +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2006-2008 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 "gpu/np_utils/dynamic_np_object.h" - -namespace np_utils { - -DynamicNPObject::DynamicNPObject(NPP npp) { -} - -void DynamicNPObject::Invalidate() { - for (PropertyMap::iterator it = properties_.begin(); - it != properties_.end(); - ++it) { - it->second.Invalidate(); - } -} - -bool DynamicNPObject::HasProperty(NPIdentifier name) { - PropertyMap::iterator it = properties_.find(name); - return it != properties_.end(); -} - -bool DynamicNPObject::GetProperty(NPIdentifier name, NPVariant* result) { - PropertyMap::iterator it = properties_.find(name); - if (it == properties_.end()) - return false; - - it->second.CopyTo(result); - return true; -} - -bool DynamicNPObject::SetProperty(NPIdentifier name, const NPVariant* value) { - properties_[name] = *value; - return true; -} - -bool DynamicNPObject::RemoveProperty(NPIdentifier name) { - properties_.erase(name); - return false; -} - -bool DynamicNPObject::Enumerate(NPIdentifier** names, uint32_t* count) { - *names = static_cast<NPIdentifier*>( - NPBrowser::get()->MemAlloc(properties_.size() * sizeof(*names))); - *count = properties_.size(); - - int i = 0; - for (PropertyMap::iterator it = properties_.begin(); - it != properties_.end(); - ++it) { - (*names)[i] = it->first; - ++i; - } - - return true; -} -} // namespace np_utils |