Revert 207278 "Make sure that the UI window created by base::Mes..."

Speculative revert: Suspected to break NavigationControllerTest.PurgeScreenshot.

> Make sure that the UI window created by base::MessagePumpForUI is destoyed on the same thread (Windows).
> 
> Currently the window created base::MessagePumpForUI can be destroyed on a wrong thread. base::MessagePumpForUI is a ref-counted class so it can (and does) outlive the owning base::MessageLoop. As the result DestroyWindow() can be called on a wrong thread. This makes TSAN unhappy and it reports races deep unside user32.dll.
> 
> Changes in this CL:
> - The message pump is now notified when the owning message loop is being destroyed. The notification is used to free all resources that hve to be released on the base::MessageLoop's thread.
> - MessagePumpForUI::ScheduleWork() synchronizes access to the message-only window handle to avoid posting messages to the window during or after its destruction.
> 
> BUG=241939
> 
> Review URL: https://chromiumcodereview.appspot.com/15709015

TBR=alexeypa@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207327 0039d316-1c4b-4281-b951-d872f2087c98


CrOS-Libchrome-Original-Commit: 51445e340fc6255dc73303d11f9db4dcc69021ed
10 files changed
tree: 589e3f28ff57990df3b52bedb113c2eb5d9fd4bc
  1. base/
  2. build/
  3. dbus/
  4. ipc/
  5. testing/
  6. third_party/