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

Unified Diff: chrome/browser/ui/views/toolbar/toolbar_button.cc

Issue 1534303002: CustomButton cleanup: make protected members private, create accessors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tidy up Created 5 years 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
Index: chrome/browser/ui/views/toolbar/toolbar_button.cc
diff --git a/chrome/browser/ui/views/toolbar/toolbar_button.cc b/chrome/browser/ui/views/toolbar/toolbar_button.cc
index 808e450ab02544f0e0ca7a8870b5297cc3cfd350..af4d4f1ffe70d9b4d3bb88d8b6b161a7f21f1265 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_button.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_button.cc
@@ -154,7 +154,7 @@ void ToolbarButton::OnMouseExited(const ui::MouseEvent& event) {
// Starting a drag results in a MouseExited, we need to ignore it.
// A right click release triggers an exit event. We want to
// remain in a PUSHED state until the drop down menu closes.
- if (state_ != STATE_DISABLED && !InDrag() && state_ != STATE_PRESSED)
+ if (state() != STATE_DISABLED && !InDrag() && state() != STATE_PRESSED)
SetState(STATE_NORMAL);
}
@@ -346,7 +346,7 @@ void ToolbarButton::ShowDropDownMenu(ui::MenuSourceType source_type) {
SetMouseHandler(nullptr);
// Set the state back to normal after the drop down menu is closed.
- if (state_ != STATE_DISABLED)
+ if (state() != STATE_DISABLED)
SetState(STATE_NORMAL);
}

Powered by Google App Engine
This is Rietveld 408576698