Avoid race condition when transferring heap snapshots

finishHeapSnapshot could be called after last transferred chunk was processed. In that case the loading phase would never complete.

When loading snapshots from file the label would never be updated to Parsing and would stay at the Loading... stage until the load is complete. Fixed that.

This change also splits 'load from backend' and 'save to file' logic into two separate transfer handlers.

BUG=None
R=eustas@chromium.org

Review URL: https://codereview.chromium.org/23482006

git-svn-id: svn://svn.chromium.org/blink/trunk@156993 bbb929c8-8fbe-4397-9dbb-9b2b20218538
DevTools: fix erroneous box size reported in metrics panel

This patch fixes "NaN x NaN" box size reported for metrics panel in certain cases.

BUG=282128

Review URL: https://chromiumcodereview.appspot.com/23799003

git-svn-id: svn://svn.chromium.org/blink/trunk@156994 bbb929c8-8fbe-4397-9dbb-9b2b20218538
DevTools: introduce screencast dimension threshold.

R=vsevik@chromium.org

Review URL: https://codereview.chromium.org/23585003

git-svn-id: svn://svn.chromium.org/blink/trunk@156995 bbb929c8-8fbe-4397-9dbb-9b2b20218538