Fixed Content Security Policy for the Code Viewer extension.

BUG=chromium:151494
TEST="View as code" should display the file's content.

Change-Id: I86054887433fbb066b5cae178e9b7d3138e4138b
Reviewed-on: https://gerrit.chromium.org/gerrit/33880
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Ready: Vladislav Kaznacheev <kaznacheev@chromium.org>
Reviewed-by: Vladislav Kaznacheev <kaznacheev@chromium.org>
Tested-by: Vladislav Kaznacheev <kaznacheev@chromium.org>
hterm 0.8.7.2: Fix regression, bold, disable pnacl

* Recompile nacl plugin without pnacl to avoid crashes on Mac and extreme
  slowness elsewhere.
* Fix keyboard regression that prevented multi-accelerator sequences (ctrl-alt-foo,
  etc) from working.
* Stop bolding colors >= 16.

BUG=chromium-os:34306, hterm shows wrong colors for bold colors 16 through 249
TEST=test_harness.html, 66/66 tests pased.

Change-Id: Ic72372b596a1ea5ae7a26ecb893cc6d271d35a03
Reviewed-on: https://gerrit.chromium.org/gerrit/33926
Reviewed-by: Marius Schilder <mschilder@google.com>
Commit-Ready: Robert Ginda <rginda@chromium.org>
Reviewed-by: Robert Ginda <rginda@chromium.org>
Tested-by: Robert Ginda <rginda@chromium.org>
In case of PNaCl add optimization flags on link stage

BUG=none
TEST=manual

Change-Id: I17843dac65caaa84389eb7c8f48022f9a5a235bb
Reviewed-on: https://gerrit.chromium.org/gerrit/33984
Commit-Ready: Dmitry Polukhin <dpolukhin@chromium.org>
Reviewed-by: Dmitry Polukhin <dpolukhin@chromium.org>
Tested-by: Dmitry Polukhin <dpolukhin@chromium.org>
hterm 0.8.7.3: Styled holes

* Backfill holes created by Erase Characters (ECH) and Delete Characters (DCH)
  with spaces in the current text style.
* Fix minor issue with Character Attributes (SGR) with colors 100-107.  These
  were setting the foreground color instead of the background.

BUG=chromium-os:30258, Text attributes not rendered for whitespace at the end
    of a line
TEST=test_harness.html, 66/66 tests passed.
TEST=run cacademo, check that output is same as xterm.

Change-Id: I181deade05c24324f998b002216cd02588b4e6e3
Reviewed-on: https://gerrit.chromium.org/gerrit/34045
Reviewed-by: Marius Schilder <mschilder@google.com>
Commit-Ready: Robert Ginda <rginda@chromium.org>
Reviewed-by: Robert Ginda <rginda@chromium.org>
Tested-by: Robert Ginda <rginda@chromium.org>
hterm 0.8.7.4: Insert lines fix.

* Fix hterm.Terminal.insertLines to move the correct rows.  This fixes the
  Reverse Index (RI) sequence (and probably others) that depended on it.

BUG=None
TEST=test_harness.html, 66/66 tests passed.
TEST=Verify that cacademo "white blobs" doesn't leave blank rows.

Change-Id: I7b534365fb424a18c3eb7a1894af15f7ab2b92ca
Reviewed-on: https://gerrit.chromium.org/gerrit/34120
Reviewed-by: Marius Schilder <mschilder@google.com>
Commit-Ready: Robert Ginda <rginda@chromium.org>
Reviewed-by: Robert Ginda <rginda@chromium.org>
Tested-by: Robert Ginda <rginda@chromium.org>
assets: Update battery alert animation.

This checks in updated assets from kenmoore@ for a ten-frame
low-battery animation for display on a black background.

BUG=chromium-os:14297
TEST=manual
CQ-DEPEND=I327ea63b87aa0ab28ef27b38ec4772390baf26bd

Change-Id: I5d14b74dae1e9b8ac6eb4054cce96deb38c30922
Reviewed-on: https://gerrit.chromium.org/gerrit/34039
Tested-by: Daniel Erat <derat@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Ready: Daniel Erat <derat@chromium.org>
Update ChromeVox 23.0 from upstream.

BUG=chromium-os:34582
TEST=Start ChromeVox on login screen with ctrl+alt+z; perform basic web navigation.

Change-Id: I457242fc19a5dc8bca2098ee2ee1f75aec10efdd
Reviewed-on: https://gerrit.chromium.org/gerrit/34286
Commit-Ready: David Tseng <dtseng@chromium.org>
Reviewed-by: David Tseng <dtseng@chromium.org>
Tested-by: David Tseng <dtseng@chromium.org>
hterm: 0.8.7.5, Text selection fix.

* Fix mouse-based text selection when the selection involves styled text.

BUG=None
TEST=Use the mouse to select combinations of styled and unstyled text,
  copy/paste the selected text and check that it is correct.
TEST=test_harness.html, 66/66 tests passed.

Change-Id: Icfad19c0aac12743a0d8a153433e9b1d176f4a3e
Reviewed-on: https://gerrit.chromium.org/gerrit/34429
Commit-Ready: Marius Schilder <mschilder@google.com>
Reviewed-by: Marius Schilder <mschilder@google.com>
Commit-Ready: Robert Ginda <rginda@chromium.org>
Reviewed-by: Robert Ginda <rginda@chromium.org>
Tested-by: Robert Ginda <rginda@chromium.org>
Update ChromeVox23 from upstream.

ChromeVox CL:  34503222

BUG=chromium-os:34582
TEST=Smoke tests
Chrome OS version: 23.0.1271.11 (dev)
Chrome OS version: TOT.

No blocking issues and requesting merge to r23.

Change-Id: I4d9a1088f66664035c5d6ba2c1eaafd94fa6f96f
Reviewed-on: https://gerrit.chromium.org/gerrit/34641
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Commit-Ready: David Tseng <dtseng@chromium.org>
Tested-by: David Tseng <dtseng@chromium.org>
Reviewed-by: David Tseng <dtseng@chromium.org>
Cherry-pick time widget support for ChromeVox 23.

BUG=chromium-os:34582
TEST=Ctrl+Alt+Z on login screen; verify basic ChromeVox behavior.

Change-Id: I34ef15c37d9e1338078eb7f6f7170c7a4ab89c49
Reviewed-on: https://gerrit.chromium.org/gerrit/34677
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Commit-Ready: David Tseng <dtseng@chromium.org>
Reviewed-by: David Tseng <dtseng@chromium.org>
Tested-by: David Tseng <dtseng@chromium.org>
Add powerwash message for user-initiated erasure of stateful partition.

We currently have a message "Erasing stateful partition". This CL adds all
these assets for various languages to make this a more user-understandable
message. The translations for following languages are missing, they'll
have to be added when they come in:

bn
ta
gu
kn
ml
mr
te

BUG=chromium-os:35089.
TEST=Tested en on ZGB.
Change-Id: I63e1877bd1f8f5ef5d49732ac72bb72d3c5cc2ec
Reviewed-on: https://gerrit.chromium.org/gerrit/34574
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Jay Srinivasan <jaysri@chromium.org>
Tested-by: Jay Srinivasan <jaysri@chromium.org>
Commit-Ready: Jay Srinivasan <jaysri@chromium.org>
hterm 0.8.7: Stable release of 0.8.7.4

* Stable release of 0.8.7.5.
* Fix mouse-based text selection when the selection involves styled text.
* Fix hterm.Terminal.insertLines to move the correct rows.  This fixes the
  Reverse Index (RI) sequence (and probably others) that depended on it.
* Backfill holes created by Erase Characters (ECH) and Delete Characters (DCH)
  with spaces in the current text style.
* Fix minor issue with Character Attributes (SGR) with colors 100-107.  These
  were setting the foreground color instead of the background.
* Fix keyboard regression that prevented multi-accelerator sequences
  (ctrl-alt-foo, etc) from working.
* Stop bolding colors >= 16.
* Changed hterm_keyboard.js to only add modifier munging to strings that
  came from the "default" action.  Other actions are assumed to already
  be appropriate for the in use modifier.
* Make Alt-F1...F12 send F11-F22.  This similar to xterm with the "VT220
  Keyboard" option is enabled, except xterm uses Ctrl as the modifier.  We use
  Alt because Ctrl-F1...F12 are not capturable on Chrome OS devices.
* Added a "textInput" event handler to hterm_keyboard.js.  We're not actually
  supposed to get these, but we do on the Mac in the case where a third party
  app sends synthetic keystrokes to Chrome.

Internal bugs:
6111077 Bluetooth OTP not working with hterm
6838548 Bluetooth OTP is not able to make past SSHinaTab

BUG=chromium-os:30857, Shift+F6 doesn't work
BUG=chromium-os:32608, Add extended function key (F13-24) support.
BUG=chromium-os:30258, Text attributes not rendered for whitespace at the end
    of a line

TEST=test_harness.html, 66/66 tests passed.

Change-Id: I9f26c5d7a2433cdfb315e9f6778946ceeec9f3a0
Reviewed-on: https://gerrit.chromium.org/gerrit/34920
Reviewed-by: Robert Ginda <rginda@chromium.org>
Tested-by: Robert Ginda <rginda@chromium.org>
Commit-Ready: Robert Ginda <rginda@chromium.org>
hterm 0.8.8.0: Synchronized preferences.

* Add lib.Storage.Local and lib.Storage.Chrome classes to normalize the API
  between window.localStorage and chrome.storage.
* Generalize nassh.PreferenceManager profile management code into
  lib.PreferenceManager so that other code can easily define child preferences.
* Add preference to override the default color palette.
* Remove session-id code.

TEST=test_harness.html, 66/66 tests passed.
BUG=chromium-os:26284, Custom palette.

Change-Id: Ic90343253dcb2235a61fcec73e21833a68022fe8
Reviewed-on: https://gerrit.chromium.org/gerrit/34237
Reviewed-by: Dmitry Polukhin <dpolukhin@chromium.org>
Reviewed-by: Marius Schilder <mschilder@google.com>
Tested-by: Marius Schilder <mschilder@google.com>
Commit-Ready: Robert Ginda <rginda@chromium.org>
Reviewed-by: Robert Ginda <rginda@chromium.org>
Tested-by: Robert Ginda <rginda@chromium.org>
hterm: add an options page

In an effort to learn more about how Chrome extensions work, I put
together an options page for the secure shell extension.

The settings are created dynamically based on the preferences that
get populated elsewhere, so it should stay relatively up-to-date.

For most options, there is no hardcoding at all.  For ones that
require a bit more work (things that aren't simple numbers or bools),
we have to add a bit more smarts.

Future work:
 - make color-palette-overrides & environment setting user friendly
 - include descriptions of settings

BUG=None
TEST=Right clicked app & selected options
TEST=changed different values and loaded up secure shell and saw them work
TEST=reset all preferences and saw it work

Change-Id: I935aa6772da7485575de864358406346d885179b
Reviewed-on: https://gerrit.chromium.org/gerrit/35565
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Robert Ginda <rginda@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
hterm: Fix scroll-on-output

This never worked right.  It was fine in an interactive session,
but any new row would cause the terminal to scroll.

BUG=chromium-os:35288, scroll-on-output doesn't appear to work
TEST=login, execute `sleep 10; seq 1000`, scroll up in termian
  and verify that you aren't automatically scrolled down in
  10 seconds.
TEST=test_harness.html, 66/66 tests passed.

Change-Id: I980d4bb80c3fd04e3bdc062db8fc4a1db6cda357
Reviewed-on: https://gerrit.chromium.org/gerrit/35646
Commit-Ready: Marius Schilder <mschilder@google.com>
Reviewed-by: Marius Schilder <mschilder@google.com>
Commit-Ready: Robert Ginda <rginda@chromium.org>
Reviewed-by: Robert Ginda <rginda@chromium.org>
Tested-by: Robert Ginda <rginda@chromium.org>
hterm: Choose a default nassh storage

* Chrome 21 doesn't have the storage.sync API, so we need to
  degrade in that case.

BUG=None
TEST=Run on Chrome OS stable (M21) and check for errors at startup.

Change-Id: Ifce5e18a5ad1d7c6e1de2772246684c32afab0ca
Reviewed-on: https://gerrit.chromium.org/gerrit/35647
Commit-Ready: Marius Schilder <mschilder@google.com>
Reviewed-by: Marius Schilder <mschilder@google.com>
Commit-Ready: Robert Ginda <rginda@chromium.org>
Reviewed-by: Robert Ginda <rginda@chromium.org>
Tested-by: Robert Ginda <rginda@chromium.org>
hterm 0.8.8.3: Include pnacl binary.

* Actually include the pnacl binary in the package.

0.8.8.2, Use pnacl on Chrome >= 23.

* Add a pnacl version of the plugin which we load only in Chrome >= 23.

BUG=chromium-os:35314
TEST=test_harness.html, 66/66 tests passed.

Change-Id: I488859eac9571bb26a4e7df80713fdf4007a20a3
Reviewed-on: https://gerrit.chromium.org/gerrit/35582
Commit-Ready: Marius Schilder <mschilder@google.com>
Reviewed-by: Marius Schilder <mschilder@google.com>
Commit-Ready: Robert Ginda <rginda@chromium.org>
Reviewed-by: Robert Ginda <rginda@chromium.org>
Tested-by: Robert Ginda <rginda@chromium.org>
hterm 0.8.8.4: 0.8.8.1 redux

* Broke 0.8.8.1 changes into smaller CLs for easier review.  This commit marks
  the re-integration of the changes.
* Re-order includes in nassh_connect_dialog.html
* Make hterm.init call back on a timeout.
* Removed lib.f.alarm for now.  This function was released as part of 0.8.8.1
  but I'm holding off on landing it until later.

BUG=None
TEST=test_harness.html, 66/66 tests passed.

Change-Id: Id8de0c821afc95b98a3a8b78a8d484754f2abfe3
Reviewed-on: https://gerrit.chromium.org/gerrit/35648
Commit-Ready: Marius Schilder <mschilder@google.com>
Reviewed-by: Marius Schilder <mschilder@google.com>
Commit-Ready: Robert Ginda <rginda@chromium.org>
Reviewed-by: Robert Ginda <rginda@chromium.org>
Tested-by: Robert Ginda <rginda@chromium.org>
hterm: Add osc52.sh, osc52.vim

Initial add of scripts to assist with clipboard integration via
OSC 52.  See also: etc/osc52.el.

* osc52.sh - Send STDIN to the terminal's clipboard.
* osc52.vim - Vim script to send an arbitrary string to the
  terminal clipboard.

BUG=None
TEST=manual

Change-Id: I7b5794e86eaa12dc0da8b79b1dccdd7266c10721
Reviewed-on: https://gerrit.chromium.org/gerrit/36283
Commit-Ready: Robert Ginda <rginda@chromium.org>
Reviewed-by: Robert Ginda <rginda@chromium.org>
Tested-by: Robert Ginda <rginda@chromium.org>
Reviewed-by: Marius Schilder <mschilder@google.com>
ssh_client: Set default terminal baud rates

* Set a default ispeed and ospeed of B38400 in JsFile::InitTerminal.

BUG=chromium-os:35643
TEST=buid Secure Shell with pnacl enabled, ssh somewhere, verify
  that `stty speed` shows "38400".

Change-Id: I69fe1bdd50b4457d30caaa3145a6931e2248bf38
Reviewed-on: https://gerrit.chromium.org/gerrit/36632
Reviewed-by: Dmitry Polukhin <dpolukhin@chromium.org>
Commit-Ready: Robert Ginda <rginda@chromium.org>
Tested-by: Robert Ginda <rginda@chromium.org>
Reviewed-by: David Sehr <sehr@chromium.org>
Tested-by: David Sehr <sehr@chromium.org>
Commit-Ready: David Sehr <sehr@chromium.org>