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

Unified Diff: gpu/np_utils/np_dispatcher_specializations.h

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.cc ('k') | gpu/np_utils/np_headers.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/np_utils/np_dispatcher_specializations.h
===================================================================
--- gpu/np_utils/np_dispatcher_specializations.h (revision 34090)
+++ gpu/np_utils/np_dispatcher_specializations.h (working copy)
@@ -1,85 +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.
-
-// There is deliberately no header guard here. This file is included multiple
-// times, once for each dispatcher specialiation arity. Do not include this
-// file directly. Include np_dispatcher.h instead.
-
-template <typename NPObjectType PARAM_TYPENAMES>
-class NPDispatcher<NPObjectType, void(PARAM_TYPES)>
- : public BaseNPDispatcher {
- typedef void (NPObjectType::*FunctionType)(PARAM_TYPES);
- public:
- NPDispatcher(BaseNPDispatcher* next,
- const NPUTF8* name,
- FunctionType function)
- : BaseNPDispatcher(next, name),
- function_(function) {
- }
-
- virtual bool Invoke(NPObject* object,
- const NPVariant* args,
- uint32_t num_args,
- NPVariant* result) {
- VOID_TO_NPVARIANT(*result);
-
- if (num_args != NUM_PARAMS)
- return false;
-
- PARAM_TO_NVPARIANT_CONVERSIONS
-
- (static_cast<NPObjectType*>(object)->*function_)(PARAM_NAMES);
- return true;
- }
-
- virtual int num_args() const {
- return NUM_PARAMS;
- }
-
- private:
- FunctionType function_;
-};
-
-template <typename NPObjectType, typename R PARAM_TYPENAMES>
-class NPDispatcher<NPObjectType, R(PARAM_TYPES)>
- : public BaseNPDispatcher {
- typedef R (NPObjectType::*FunctionType)(PARAM_TYPES);
- public:
- NPDispatcher(BaseNPDispatcher* next,
- const NPUTF8* name,
- FunctionType function)
- : BaseNPDispatcher(next, name),
- function_(function) {
- }
-
- virtual bool Invoke(NPObject* object,
- const NPVariant* args,
- uint32_t num_args,
- NPVariant* result) {
- VOID_TO_NPVARIANT(*result);
-
- if (num_args != NUM_PARAMS)
- return false;
-
- PARAM_TO_NVPARIANT_CONVERSIONS
-
- ValueToNPVariant(
- (static_cast<NPObjectType*>(object)->*function_)(PARAM_NAMES), result);
- return true;
- }
-
- virtual int num_args() const {
- return NUM_PARAMS;
- }
-
- private:
- FunctionType function_;
-};
-
-#undef NUM_PARAMS
-#undef PARAM_TYPENAMES
-#undef PARAM_TYPES
-#undef PARAM_NAMES
-#undef PARAM_DECLS
-#undef PARAM_TO_NVPARIANT_CONVERSIONS
« no previous file with comments | « gpu/np_utils/np_dispatcher.cc ('k') | gpu/np_utils/np_headers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698