Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(608)

Unified Diff: gpu/np_utils/dynamic_np_object.cc

Issue 481007: Deleted np_utils library. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/np_utils/dynamic_np_object.h ('k') | gpu/np_utils/dynamic_np_object_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/np_utils/dynamic_np_object.cc
===================================================================
--- gpu/np_utils/dynamic_np_object.cc (revision 34090)
+++ gpu/np_utils/dynamic_np_object.cc (working copy)
@@ -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
« no previous file with comments | « gpu/np_utils/dynamic_np_object.h ('k') | gpu/np_utils/dynamic_np_object_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698