Refactor modality-specific behavior from ConstrainedWindowViews to WebContentsModalDialogManager
This CL moves the Views web contents modal dialog code towards the
interface described in the associated bug. Similar changes for Gtk and
Cocoa will be made in follow-on CLs.
To that end, this CL contains the following detailed changes:
- Introduce NativeWebContentsModalDialogManager for providing
platform-specific UI functionality within WebContentsModalDialogManager, and
implement NativeWebContentsModalDialogManagerViews.
- Under Views, move to a model where WebContentsModalDialogManager listens for
closing events rather than requiring notifications from the widget. Continue
using the existing model on Gtk and Cocoa, pending refactoring there.
- Provide a mechanism for disabling mouse-driven dialog movement on Widget.
- Remove NativeConstrainedWindowDelegate and subclasses as they're no longer
necessary due to the above two items.
- Update tests to account for closing notification to
WebContentsModalDialogManager being done from the event loop, rather than
synchronously.
- Add temporary ConstrainedWindowViews factory function to minimize code churn
at construction sites during this refactoring.
The next planned steps in this work are:
- Refactor ConstrainedWindow subclasses under Gtk and Cocoa to listen for
closing events rather than requiring notifications from the widget.
- Refactor uses of WebContentsModalDialog interface to use platform-specific
equivalents in platform-specific code and, in platform-independent code,
invoke functionality via some other mechanism: platform_utils,
WebContentsModalDialogManager, ???. Remove WebContentsModalDialog interface.
- Generalize WebContentsModalDialogManagerDelegate positioning interface and
write WebContentsModalDialogManager::ShowDialog using the new interface.
BUG=157161
Review URL: https://chromiumcodereview.appspot.com/
12045037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180904 0039d316-1c4b-4281-b951-d872f2087c98