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

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

Issue 1690133003: DialogClientView: Correct the order in which subviews are focused. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed review comments. Created 4 years, 10 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 private: 81 private:
82 bool has_dialog_buttons() const { return ok_button_ || cancel_button_; } 82 bool has_dialog_buttons() const { return ok_button_ || cancel_button_; }
83 83
84 // Create a dialog button of the appropriate type. 84 // Create a dialog button of the appropriate type.
85 LabelButton* CreateDialogButton(ui::DialogButton type); 85 LabelButton* CreateDialogButton(ui::DialogButton type);
86 86
87 // Update |button|'s text and enabled state according to the delegate's state. 87 // Update |button|'s text and enabled state according to the delegate's state.
88 void UpdateButton(LabelButton* button, ui::DialogButton type); 88 void UpdateButton(LabelButton* button, ui::DialogButton type);
89 89
90 // Update the OK button to match the dialog's delegate.
91 void UpdateOKButton();
92
93 // Update the cancel button to match the dialog's delegate.
94 void UpdateCancelButton();
95
90 // Returns the height of the row containing the buttons and the extra view. 96 // Returns the height of the row containing the buttons and the extra view.
91 int GetButtonsAndExtraViewRowHeight() const; 97 int GetButtonsAndExtraViewRowHeight() const;
92 98
93 // Returns the insets for the buttons and extra view. 99 // Returns the insets for the buttons and extra view.
94 gfx::Insets GetButtonRowInsets() const; 100 gfx::Insets GetButtonRowInsets() const;
95 101
96 // Closes the widget. 102 // Closes the widget.
97 void Close(); 103 void Close();
98 104
99 // The dialog buttons. 105 // The dialog buttons.
(...skipping 11 matching lines...) Expand all
111 // http://crbug.com/71940). This is used to avoid notifying the delegate 117 // http://crbug.com/71940). This is used to avoid notifying the delegate
112 // twice, which can have bad consequences. 118 // twice, which can have bad consequences.
113 bool notified_delegate_; 119 bool notified_delegate_;
114 120
115 DISALLOW_COPY_AND_ASSIGN(DialogClientView); 121 DISALLOW_COPY_AND_ASSIGN(DialogClientView);
116 }; 122 };
117 123
118 } // namespace views 124 } // namespace views
119 125
120 #endif // UI_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_ 126 #endif // UI_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | ui/views/window/dialog_client_view.cc » ('j') | ui/views/window/dialog_client_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698