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

Unified Diff: examples/srpc/duality/duality.h

Issue 2856050: Adding srpc example to naclports. (Closed) Base URL: http://naclports.googlecode.com/svn/trunk/src/
Patch Set: '' Created 10 years, 5 months 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 | « examples/srpc/duality/Makefile ('k') | examples/srpc/duality/duality.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: examples/srpc/duality/duality.h
===================================================================
--- examples/srpc/duality/duality.h (revision 0)
+++ examples/srpc/duality/duality.h (revision 0)
@@ -0,0 +1,33 @@
+// Copyright 2010 The Native Client SDK 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 EXAMPLES_SRPC_DUALITY_DUALITY_H_
+#define EXAMPLES_SRPC_DUALITY_DUALITY_H_
+
+#include <examples/srpc/duality/scriptable.h>
+
+#include <nacl/nacl_srpc.h>
+
+#include <string>
+
+// Extends Scriptable and adds the plugin's specific functionality.
+class Duality : public Scriptable {
+ public:
+ Duality();
+ virtual ~Duality();
+
+ static bool SayHello(Scriptable * instance,
+ const NPVariant* args,
+ uint32_t arg_count,
+ NPVariant* result);
+
+ private:
+ // Populates the method table with our specific interface.
+ virtual void InitializeMethodTable();
+ // Populates the propert table with our specific interface.
+ // Since this class has no visible properties the function does nothing.
+ virtual void InitializePropertyTable() {}
+};
+
+#endif // EXAMPLES_SRPC_DUALITY_DUALITY_H_
« no previous file with comments | « examples/srpc/duality/Makefile ('k') | examples/srpc/duality/duality.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698