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

Unified Diff: visual_studio/NativeClientVSAddIn/TestingProjects/DummyLoop/DummyLoop/main.cpp

Issue 10831030: NaCl settings and completed install scripts. (Closed) Base URL: https://nativeclient-sdk.googlecode.com/svn/trunk/src
Patch Set: Created 8 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
Index: visual_studio/NativeClientVSAddIn/TestingProjects/DummyLoop/DummyLoop/main.cpp
diff --git a/visual_studio/NativeClientVSAddIn/TestingProjects/DummyLoop/DummyLoop/main.cpp b/visual_studio/NativeClientVSAddIn/TestingProjects/DummyLoop/DummyLoop/main.cpp
deleted file mode 100644
index b3964d8924246dd13c1cf967ffbad635e97139ca..0000000000000000000000000000000000000000
--- a/visual_studio/NativeClientVSAddIn/TestingProjects/DummyLoop/DummyLoop/main.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) 2012 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.
-
-/// This project is for use with the testing framework
-/// of the Visual Studio Add-in.
-
-#include <string>
-
-#include "ppapi/cpp/instance.h"
-#include "ppapi/cpp/module.h"
-#include "ppapi/cpp/var.h"
-
-class DummyInstance : public pp::Instance {
- public:
- /// The constructor creates the plugin-side instance.
- /// @param[in] instance the handle to the browser-side plugin instance.
- explicit DummyInstance(PP_Instance instance)
- : pp::Instance(instance) {
- }
-
- virtual ~DummyInstance() {
- }
-
- virtual bool Init(uint32_t /*argc*/, const char* /*argn*/[],
- const char* /*argv*/[]) {
- // Start chain of message relaying.
- PostMessage(pp::Var("relay1"));
- return true;
- }
-
- private:
- virtual void HandleMessage(const pp::Var& var_message) {
- // Simply relay back to javascript the message we just received.
- if (!var_message.is_string())
- return;
- std::string msg = var_message.AsString();
- PostMessage(pp::Var(msg));
- }
-};
-
-/// The Module class. The browser calls the CreateInstance() method to create
-/// an instance of your NaCl module on the web page. The browser creates a new
-/// instance for each <embed> tag with type="application/x-nacl".
-class DummyModule : public pp::Module {
- public:
- DummyModule() : pp::Module() {}
- virtual ~DummyModule() {}
-
- /// Create and return a FileIoInstance object.
- /// @param[in] instance The browser-side instance.
- /// @return the plugin-side instance.
- virtual pp::Instance* CreateInstance(PP_Instance instance) {
- return new DummyInstance(instance);
- }
-};
-
-namespace pp {
-Module* CreateModule() {
- return new DummyModule();
-}
-} // namespace pp
-

Powered by Google App Engine
This is Rietveld 408576698