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

Unified Diff: visual_studio/NativeClientVSAddIn/InstallerResources/examples/hello_nacl_cpp/hello_nacl_cpp/index.html

Issue 11150028: Add new VS AddIn examples (Closed) Base URL: http://nativeclient-sdk.googlecode.com/svn/trunk/src
Patch Set: Created 8 years, 2 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/InstallerResources/examples/hello_nacl_cpp/hello_nacl_cpp/index.html
diff --git a/visual_studio/NativeClientVSAddIn/InstallerResources/examples/hello_nacl_cpp/hello_nacl_cpp/index.html b/visual_studio/NativeClientVSAddIn/InstallerResources/examples/hello_nacl_cpp/hello_nacl_cpp/index.html
new file mode 100644
index 0000000000000000000000000000000000000000..c5c76570012a33fd9aad8ead6b5ca6ed450bc0a4
--- /dev/null
+++ b/visual_studio/NativeClientVSAddIn/InstallerResources/examples/hello_nacl_cpp/hello_nacl_cpp/index.html
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<html>
+ <!--
+ 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.
+ -->
+<head>
+ <meta http-equiv="Pragma" content="no-cache">
+ <meta http-equiv="Expires" content="-1">
+ <script type="text/javascript">
+ function pageDidLoad() {
+ appendStatus('Page loaded');
+ }
+
+ function appendStatus(opt_message) {
+ var statusField = document.getElementById('statusField');
+ if (statusField) {
+ var newElt = document.createElement("opt_message");
+ newElt.innerHTML = "<br>" + opt_message;
+ statusField.appendChild(newElt);
+ }
+ }
+
+ function handleMessage(message_event) {
+ appendStatus(message_event.data);
+ }
+ </script>
+</head>
+<body onload="pageDidLoad()">
+ <div id="listener">
+ <script type="text/javascript">
+ var listener = document.getElementById('listener');
+ listener.addEventListener('message', handleMessage, true);
+ </script>
+ <h2>NaCl Module</h2>
+ <embed name="nacl_module"
+ id="nacl_module"
+ style="border-style: solid;"
+ width=200
+ height=200
+ src="newlib/hello_nacl_cpp.nmf"
+ type="application/x-nacl"/>
+ </div>
+ <div>
+ <h2>Messages: <code id="statusField"></code></h2>
+ </div>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698