Add most missing blink files to .gn files

I copied the list of missing files to a txt file and ran this script:

    import os, re, subprocess
    edits = {}
    for filename in open('headers.txt'):
      filename = filename.strip()
      dirname = os.path.dirname(filename)
      while not os.path.exists(os.path.join(dirname, 'BUILD.gn')):
	dirname = os.path.dirname(dirname)
      rel = filename[len(dirname) + 1:]
      gnfile = os.path.join(dirname, 'BUILD.gn')
      #print gnfile, rel

      lines = open(gnfile).read().splitlines()
      index = next( (i for i, l in enumerate(lines) if ' sources = [' in l), -1)
      if index == -1:
	continue
      lines.insert(index + 1, '"%s",' % rel)
      open(gnfile, 'w').write('\n'.join(lines))

Then I ran `git cl format` to re-sort source lists.

I manually fixed up
third_party/WebKit/Source/platform/BUILD.gn,
third_party/WebKit/public/BUILD.gn,
third_party/WebKit/Source/platform/BUILD.gn,
where this simple heuristic hadn't worked well.

I reverted changes to third_party/WebKit/Source/platform/mojo/BUILD.gn
because I don't understand that directory.

BUG=661774
NOTRY=true
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2771373003
Cr-Commit-Position: refs/heads/master@{#459673}
31 files changed