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

Unified Diff: gpu/np_utils/np_dispatcher.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/np_dispatcher.h ('k') | gpu/np_utils/np_dispatcher_specializations.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/np_utils/np_dispatcher.cc
===================================================================
--- gpu/np_utils/np_dispatcher.cc (revision 34090)
+++ gpu/np_utils/np_dispatcher.cc (working copy)
@@ -1,86 +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/np_dispatcher.h"
-
-namespace np_utils {
-
-bool DispatcherHasMethodHelper(BaseNPDispatcher* chain,
- NPObject* object,
- NPIdentifier name) {
- for (BaseNPDispatcher* dispatcher = chain;
- dispatcher;
- dispatcher = dispatcher->next()) {
- if (dispatcher->name() == name) {
- return true;
- }
- }
-
- return false;
-}
-
-bool DispatcherInvokeHelper(BaseNPDispatcher* chain,
- NPObject* object,
- NPIdentifier name,
- const NPVariant* args,
- uint32_t num_args,
- NPVariant* result) {
- VOID_TO_NPVARIANT(*result);
-
- for (BaseNPDispatcher* dispatcher = chain;
- dispatcher;
- dispatcher = dispatcher->next()) {
- if (dispatcher->name() == name &&
- dispatcher->num_args() == static_cast<int>(num_args)) {
- if (dispatcher->Invoke(object, args, num_args, result))
- return true;
- }
- }
-
- return false;
-}
-
-bool DispatcherEnumerateHelper(BaseNPDispatcher* chain,
- NPObject* object,
- NPIdentifier** names,
- uint32_t* num_names) {
- // Count the number of names.
- *num_names = 0;
- for (BaseNPDispatcher* dispatcher = chain;
- dispatcher;
- dispatcher = dispatcher->next()) {
- ++(*num_names);
- }
-
- // Copy names into the array.
- *names = static_cast<NPIdentifier*>(
- NPBrowser::get()->MemAlloc((*num_names) * sizeof(**names)));
- int i = 0;
- for (BaseNPDispatcher* dispatcher = chain;
- dispatcher;
- dispatcher = dispatcher->next()) {
- (*names)[i] = dispatcher->name();
- ++i;
- }
-
- return true;
-}
-
-BaseNPDispatcher::BaseNPDispatcher(BaseNPDispatcher* next, const NPUTF8* name)
- : next_(next) {
- // Convert first character to lower case if it is the ASCII range.
- // TODO(apatrick): do this correctly for non-ASCII characters.
- std::string java_script_style_name(name);
- if (isupper(java_script_style_name[0])) {
- java_script_style_name[0] = tolower(java_script_style_name[0]);
- }
-
- name_ = NPBrowser::get()->GetStringIdentifier(
- java_script_style_name.c_str());
-}
-
-BaseNPDispatcher::~BaseNPDispatcher() {
-}
-
-} // namespace np_utils
« no previous file with comments | « gpu/np_utils/np_dispatcher.h ('k') | gpu/np_utils/np_dispatcher_specializations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698