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

Unified Diff: ash/shelf/app_list_button.cc

Issue 2095193002: clang-format all of //ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « ash/screenshot_delegate.h ('k') | ash/shelf/app_list_shelf_item_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/app_list_button.cc
diff --git a/ash/shelf/app_list_button.cc b/ash/shelf/app_list_button.cc
index 885b534f0ef1a4b3aea6bb8ff317e35c747a1fdc..1fb50398c101db0230bfe64aa0f319a58a00e72f 100644
--- a/ash/shelf/app_list_button.cc
+++ b/ash/shelf/app_list_button.cc
@@ -46,7 +46,7 @@ AppListButton::AppListButton(InkDropButtonListener* listener,
SetSize(
gfx::Size(GetShelfConstant(SHELF_SIZE), GetShelfConstant(SHELF_SIZE)));
SetFocusPainter(views::Painter::CreateSolidFocusPainter(
- kFocusBorderColor, gfx::Insets(1, 1, 1, 1)));
+ kFocusBorderColor, gfx::Insets(1, 1, 1, 1)));
set_notify_action(CustomButton::NOTIFY_ON_PRESS);
}
@@ -76,35 +76,35 @@ bool AppListButton::OnMouseDragged(const ui::MouseEvent& event) {
void AppListButton::OnGestureEvent(ui::GestureEvent* event) {
switch (event->type()) {
- case ui::ET_GESTURE_SCROLL_BEGIN:
- if (switches::IsTouchFeedbackEnabled())
- SetDrawBackgroundAsActive(false);
- shelf_view_->PointerPressedOnButton(this, ShelfView::TOUCH, *event);
- event->SetHandled();
- return;
- case ui::ET_GESTURE_SCROLL_UPDATE:
- shelf_view_->PointerDraggedOnButton(this, ShelfView::TOUCH, *event);
- event->SetHandled();
- return;
- case ui::ET_GESTURE_SCROLL_END:
- case ui::ET_SCROLL_FLING_START:
- shelf_view_->PointerReleasedOnButton(this, ShelfView::TOUCH, false);
- event->SetHandled();
- return;
- case ui::ET_GESTURE_TAP_DOWN:
- if (switches::IsTouchFeedbackEnabled())
- SetDrawBackgroundAsActive(true);
- ImageButton::OnGestureEvent(event);
- break;
- case ui::ET_GESTURE_TAP_CANCEL:
- case ui::ET_GESTURE_TAP:
- if (switches::IsTouchFeedbackEnabled())
- SetDrawBackgroundAsActive(false);
- ImageButton::OnGestureEvent(event);
- break;
- default:
- ImageButton::OnGestureEvent(event);
- return;
+ case ui::ET_GESTURE_SCROLL_BEGIN:
+ if (switches::IsTouchFeedbackEnabled())
+ SetDrawBackgroundAsActive(false);
+ shelf_view_->PointerPressedOnButton(this, ShelfView::TOUCH, *event);
+ event->SetHandled();
+ return;
+ case ui::ET_GESTURE_SCROLL_UPDATE:
+ shelf_view_->PointerDraggedOnButton(this, ShelfView::TOUCH, *event);
+ event->SetHandled();
+ return;
+ case ui::ET_GESTURE_SCROLL_END:
+ case ui::ET_SCROLL_FLING_START:
+ shelf_view_->PointerReleasedOnButton(this, ShelfView::TOUCH, false);
+ event->SetHandled();
+ return;
+ case ui::ET_GESTURE_TAP_DOWN:
+ if (switches::IsTouchFeedbackEnabled())
+ SetDrawBackgroundAsActive(true);
+ ImageButton::OnGestureEvent(event);
+ break;
+ case ui::ET_GESTURE_TAP_CANCEL:
+ case ui::ET_GESTURE_TAP:
+ if (switches::IsTouchFeedbackEnabled())
+ SetDrawBackgroundAsActive(false);
+ ImageButton::OnGestureEvent(event);
+ break;
+ default:
+ ImageButton::OnGestureEvent(event);
+ return;
}
}
@@ -247,8 +247,7 @@ void AppListButton::NotifyClick(const ui::Event& event) {
listener_->ButtonPressed(this, event, ink_drop());
}
-void AppListButton::SetDrawBackgroundAsActive(
- bool draw_background_as_active) {
+void AppListButton::SetDrawBackgroundAsActive(bool draw_background_as_active) {
if (draw_background_as_active_ == draw_background_as_active)
return;
draw_background_as_active_ = draw_background_as_active;
« no previous file with comments | « ash/screenshot_delegate.h ('k') | ash/shelf/app_list_shelf_item_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698