hterm-dev-0.7.6.4: Update manifest file to v2, fix CSP fallout.

* Add 'manifest_version': 2 to manifest file, specify default
  Content Security Policy (CSP) policy.
* Kick off nassh initialization from nassh.js rather than
  nassh.html to make CSP happy.
* Move dialog code from terminal.* into nassh.*, makes CSP happier
  and it's the right thing to do.

BUG=chromium-os:28561
TEST=test_harness.html, 57/57 tests passed.

Change-Id: Iaaeaa6b9a2dce96b24a281eaaa8a341804db21d4
Reviewed-on: https://gerrit.chromium.org/gerrit/19596
Commit-Ready: Robert Ginda <rginda@chromium.org>
Reviewed-by: Robert Ginda <rginda@chromium.org>
Tested-by: Robert Ginda <rginda@chromium.org>
Commit-Ready: Marius Schilder <mschilder@google.com>
diff --git a/hterm/js/terminal.js b/hterm/js/terminal.js
index bed8fb7..11fdfbf 100644
--- a/hterm/js/terminal.js
+++ b/hterm/js/terminal.js
@@ -709,6 +709,7 @@
   this.div_ = div;
 
   this.scrollPort_.decorate(div);
+  this.div_.focus = this.focus.bind(this);
 
   this.setFontSize(this.prefs_.get('font-size'));
   this.syncFontFamily();
@@ -730,24 +731,25 @@
 
   this.setReverseVideo(false);
 
-  var link = this.document_.createElement('link');
-  link.setAttribute('href', '../css/dialogs.css');
-  link.setAttribute('rel', 'stylesheet');
-  this.document_.head.appendChild(link);
-
-  this.alertDialog = new AlertDialog(this.document_.body);
-  this.promptDialog = new PromptDialog(this.document_.body);
-  this.confirmDialog = new ConfirmDialog(this.document_.body);
-
   this.scrollPort_.focus();
   this.scrollPort_.scheduleRedraw();
 };
 
+/**
+ * Return the HTML document that contains the terminal DOM nodes.
+ */
 hterm.Terminal.prototype.getDocument = function() {
   return this.document_;
 };
 
 /**
+ * Focus the terminal.
+ */
+hterm.Terminal.prototype.focus = function() {
+  this.scrollPort_.focus();
+};
+
+/**
  * Return the HTML Element for a given row index.
  *
  * This is a method from the RowProvider interface.  The ScrollPort uses