hterm: Implement character set selection (SCS)

* Also, pass Alt-*-Tab to the browser.

BUG=chromium-os:26290
TEST=test_harness.html, 61/61 tests passed.

Change-Id: I703d9733ff8e4d3a251b66805e1c2f9fb297d450
Reviewed-on: https://gerrit.chromium.org/gerrit/25599
Reviewed-by: Marius Schilder <mschilder@google.com>
Reviewed-by: Robert Ginda <rginda@chromium.org>
Tested-by: Robert Ginda <rginda@chromium.org>
Commit-Ready: Robert Ginda <rginda@chromium.org>
diff --git a/hterm/js/hterm_terminal.js b/hterm/js/hterm_terminal.js
index e6da05c..74eaf9c 100644
--- a/hterm/js/hterm_terminal.js
+++ b/hterm/js/hterm_terminal.js
@@ -552,6 +552,10 @@
   return this.screen_.textAttributes;
 };
 
+hterm.Terminal.prototype.setTextAttributes = function(textAttributes) {
+  this.screen_.textAttributes = textAttributes;
+};
+
 /**
  * Return the current browser zoom factor applied to the terminal.
  *
@@ -904,28 +908,6 @@
 };
 
 /**
- * Save cursor position and attributes.
- *
- * TODO(rginda): Save attributes once we support them.
- */
-hterm.Terminal.prototype.saveOptions = function() {
-  this.savedOptions_.cursor = this.saveCursor();
-  this.savedOptions_.textAttributes = this.screen_.textAttributes.clone();
-};
-
-/**
- * Restore cursor position and attributes.
- *
- * TODO(rginda): Restore attributes once we support them.
- */
-hterm.Terminal.prototype.restoreOptions = function() {
-  if (this.savedOptions_.cursor)
-    this.restoreCursor(this.savedOptions_.cursor);
-  if (this.savedOptions_.textAttributes)
-    this.screen_.textAttributes = this.savedOptions_.textAttributes;
-};
-
-/**
  * Interpret a sequence of characters.
  *
  * Incomplete escape sequences are buffered until the next call.