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

Unified Diff: chrome/browser/ui/views/tabs/media_indicator_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/tabs/media_indicator_button.cc
diff --git a/chrome/browser/ui/views/tabs/media_indicator_button.cc b/chrome/browser/ui/views/tabs/media_indicator_button.cc
index 45d2e0100f61722a2f13a37ea7a4da79328025a2..5cce70b741d4fbe5ac60c0feb1d3289602263672 100644
--- a/chrome/browser/ui/views/tabs/media_indicator_button.cc
+++ b/chrome/browser/ui/views/tabs/media_indicator_button.cc
@@ -148,7 +148,7 @@ bool MediaIndicatorButton::OnMousePressed(const ui::MouseEvent& event) {
// pressed or when any modifier keys are being held down. Instead, the Tab
// should react (e.g., middle-click for close, right-click for context menu).
if (event.flags() != ui::EF_LEFT_MOUSE_BUTTON) {
- if (state_ != views::CustomButton::STATE_DISABLED)
+ if (state() != views::CustomButton::STATE_DISABLED)
SetState(views::CustomButton::STATE_NORMAL); // Turn off hover.
return false; // Event to be handled by Tab.
}
@@ -166,7 +166,7 @@ bool MediaIndicatorButton::OnMouseDragged(const ui::MouseEvent& event) {
void MediaIndicatorButton::OnMouseEntered(const ui::MouseEvent& event) {
// If any modifier keys are being held down, do not turn on hover.
- if (state_ != views::CustomButton::STATE_DISABLED &&
+ if (state() != views::CustomButton::STATE_DISABLED &&
event.flags() != ui::EF_NONE) {
SetState(views::CustomButton::STATE_NORMAL);
return;
@@ -176,7 +176,7 @@ void MediaIndicatorButton::OnMouseEntered(const ui::MouseEvent& event) {
void MediaIndicatorButton::OnMouseMoved(const ui::MouseEvent& event) {
// If any modifier keys are being held down, turn off hover.
- if (state_ != views::CustomButton::STATE_DISABLED &&
+ if (state() != views::CustomButton::STATE_DISABLED &&
event.flags() != ui::EF_NONE) {
SetState(views::CustomButton::STATE_NORMAL);
return;

Powered by Google App Engine
This is Rietveld 408576698