summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/new_profile_dialog.cc
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-18 00:46:20 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-18 00:46:20 +0000
commit1d80250af1a1959e739cc02a13576401b5f113f5 (patch)
treeb3397de1f1175aae3b27b9dc75aa99f92c31502c /chrome/browser/views/new_profile_dialog.cc
parent9ef017bc62963d792e42868576837129d71354f8 (diff)
downloadchromium_src-1d80250af1a1959e739cc02a13576401b5f113f5.zip
chromium_src-1d80250af1a1959e739cc02a13576401b5f113f5.tar.gz
chromium_src-1d80250af1a1959e739cc02a13576401b5f113f5.tar.bz2
HtmlDialogs had focus problems.
They would not be focused when shown and tab traversal was not working. This was caused by several issues: - HWNDView was not focusing its HWND when focused through the View::RequestFocus() method (it would rely on the default view behavior which is to focus the root view HWND), so it would not be focused by default. - DOMView (parent of HtmlDialogView) was not focusable so would not get the focus when pressing tab. - DOMView was not eating tab keys events (by returning false in View::CanProcessTabKeyEvents()), so the render view would not get the tab key press messages (for focus traversal in the render view). Note: most of the file changes in this CL are just the consequence of changing the constness of the WindowDelegate::GetInitiallyFocusedView method. BUG=6859 TEST=Open a web page, from the page menu, select the "Create application shortcut..." menu. In the dialog, press the TAB key, focus should alternate between the different fields Review URL: http://codereview.chromium.org/21439 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9925 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/new_profile_dialog.cc')
-rw-r--r--chrome/browser/views/new_profile_dialog.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/browser/views/new_profile_dialog.cc b/chrome/browser/views/new_profile_dialog.cc
index 07c3c708..2d49a8c 100644
--- a/chrome/browser/views/new_profile_dialog.cc
+++ b/chrome/browser/views/new_profile_dialog.cc
@@ -50,7 +50,7 @@ int NewProfileDialog::GetDialogButtons() const {
return DIALOGBUTTON_OK | DIALOGBUTTON_CANCEL;
}
-views::View* NewProfileDialog::GetInitiallyFocusedView() const {
+views::View* NewProfileDialog::GetInitiallyFocusedView() {
views::TextField* text_box = message_box_view_->text_box();
DCHECK(text_box);
return text_box;