Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Side by Side Diff: ui/views/window/dialog_client_view.h

Issue 2807653002: Ensure default dialog button focus remains after a dialog update. (Closed)
Patch Set: Addressing Devlin's comments. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_ 5 #ifndef UI_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_
6 #define UI_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_ 6 #define UI_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_
7 7
8 #include "base/gtest_prod_util.h" 8 #include "base/gtest_prod_util.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "ui/base/ui_base_types.h" 10 #include "ui/base/ui_base_types.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 // True if we've notified the delegate the window is closing and the delegate 124 // True if we've notified the delegate the window is closing and the delegate
125 // allowed the close. In some situations it's possible to get two closes (see 125 // allowed the close. In some situations it's possible to get two closes (see
126 // http://crbug.com/71940). This is used to avoid notifying the delegate 126 // http://crbug.com/71940). This is used to avoid notifying the delegate
127 // twice, which can have bad consequences. 127 // twice, which can have bad consequences.
128 bool delegate_allowed_close_ = false; 128 bool delegate_allowed_close_ = false;
129 129
130 // Used to prevent unnecessary or potentially harmful changes during 130 // Used to prevent unnecessary or potentially harmful changes during
131 // SetupLayout(). Everything will be manually updated afterwards. 131 // SetupLayout(). Everything will be manually updated afterwards.
132 bool adding_or_removing_views_ = false; 132 bool adding_or_removing_views_ = false;
133 133
134 // The dialog button with the default focus.
135 View* default_focus_ = nullptr;
136
134 DISALLOW_COPY_AND_ASSIGN(DialogClientView); 137 DISALLOW_COPY_AND_ASSIGN(DialogClientView);
135 }; 138 };
136 139
137 } // namespace views 140 } // namespace views
138 141
139 #endif // UI_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_ 142 #endif // UI_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698