Fix views::WebView focus for Print Preview and other web dialogs.
commit07c63d399d1904ac8b0b5b88e0ca41b3483b7826
authormsw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 1 Aug 2014 20:39:15 +0000 (1 20:39 +0000)
committermsw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 1 Aug 2014 20:39:15 +0000 (1 20:39 +0000)
tree700bae9d84c6017d5451958f8f1ea160edd81f05
parent016eeef8372fb068e226611e3fc4e3691a3d5c03
Fix views::WebView focus for Print Preview and other web dialogs.

Focus the dialog's WebView when its WebContents is focused.
Use a FocusChangeObserver to assist with this task.

BrowserView does this for its WebViews by overriding:
  WebContentsDelegate::WebContentsFocused

TODO: Cleanup the WebView/WebContents/etc. focus pattern...
(See Ben's WebView::OnWebContentsFocused TODO)

BUG=368691
TEST=Focusing between the omnibox and print preview dialogs works correctly (the omnibox loses focus, closes any dropdowns, doesn't show cursor/selection).
R=ben@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287082 0039d316-1c4b-4281-b951-d872f2087c98
chrome/browser/ui/views/constrained_web_dialog_delegate_views.cc