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

Unified Diff: views/controls/button/native_button.cc

Issue 6133011: Cleanup: Remove SetAppearsAsDefault() since it is no longer called externally... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/controls/button/native_button.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/button/native_button.cc
===================================================================
--- views/controls/button/native_button.cc (revision 71129)
+++ views/controls/button/native_button.cc (working copy)
@@ -87,11 +87,14 @@
void NativeButton::SetIsDefault(bool is_default) {
if (is_default == is_default_)
return;
- if (is_default)
+ is_default_ = is_default;
+ if (is_default_)
AddAccelerator(Accelerator(app::VKEY_RETURN, false, false, false));
else
RemoveAccelerator(Accelerator(app::VKEY_RETURN, false, false, false));
- SetAppearsAsDefault(is_default);
+ if (native_wrapper_)
+ native_wrapper_->UpdateDefault();
+ PreferredSizeChanged();
}
void NativeButton::SetNeedElevation(bool need_elevation) {
@@ -101,13 +104,6 @@
PreferredSizeChanged();
}
-void NativeButton::SetAppearsAsDefault(bool appears_as_default) {
- is_default_ = appears_as_default;
- if (native_wrapper_)
- native_wrapper_->UpdateDefault();
- PreferredSizeChanged();
-}
-
void NativeButton::ButtonPressed() {
RequestFocus();
« no previous file with comments | « views/controls/button/native_button.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698