Reduce includes of windows.h

Windows.h is included in a number of key header files which means that
a majority of the translation units when building Chrome include
Windows.h. This is slowing down builds.

This change creates a new header - base/win/windows_types.h - which
contains typedefs and defines of common Windows.h types - and uses this
in place of windows.h in enough places to reduce the number of
translation units that include windows.h in a build of the 'chrome'
target (debug component non-jumbo) by 5219, from 19041 to 13822, giving
measurable build-time speedups (~2.5-3.0%).

Follow-up changes will apply the same techniques to more headers and
drop the number much further.

Perversely enough, this change also adds includes of windows.h in many
places - places that always needed windows.h but were implicitly
depending on it being included elsewhere.

TBR=jochen@chromium.org,wfh@chromium.org,rockot@chromium.org,mef@chromium.org,raymes@chromium.org,joedow@chromium.org,rogerta@chromium.org,jsbell@chromium.org,dpranke@chromium.org,sky@chromium.org
TBRing mechanical changes, reviewers:
jochen@ : Please review changes to chrome/, components/, content/, third_party/WebKit/Source/platform
wfh@ : Please review changes to courgette/, sandbox/win
rockot@ : Please review changes to device/, ipc/, services/
mef@ : Please review changes to net/
raymes@ : Please review changes to ppapi/
joedow@ : Please review changes to remoting/
rogerta@ : Please review changes to rlz/
jsbell@: Please review changes to storage/
dpranke@ : Please review changes to tools/gn/
sky@ : Please review changes to ui/


Bug: 796644,798763
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel;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
Change-Id: I3958d0d7d813bed74d9b166e0358dbde5b5729af
Reviewed-on: https://chromium-review.googlesource.com/846422
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Misha Efimov <mef@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#526881}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: bfdc3fdc473922b0b99a0a0af37e8f8f97340173
1 file changed
tree: e79d1d59dce2b81bb1c6adec3845b380cd90a87f
  1. linux/
  2. mac/
  3. win/
  4. BUILD.gn
  5. features.gni
  6. ipc.dict
  7. OWNERS
  8. sandbox_export.h