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

Side by Side Diff: ash/shelf/shelf_view.cc

Issue 1061283004: Fixed minor formatting in ash/shelf/shelf_view.cc:RecordIconActivatedAction(...) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "ash/shelf/shelf_view.h" 5 #include "ash/shelf/shelf_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/ash_constants.h" 9 #include "ash/ash_constants.h"
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 break; 303 break;
304 case STATUS_ATTENTION: 304 case STATUS_ATTENTION:
305 button->ClearState(ShelfButton::STATE_ACTIVE); 305 button->ClearState(ShelfButton::STATE_ACTIVE);
306 button->ClearState(ShelfButton::STATE_RUNNING); 306 button->ClearState(ShelfButton::STATE_RUNNING);
307 button->AddState(ShelfButton::STATE_ATTENTION); 307 button->AddState(ShelfButton::STATE_ATTENTION);
308 break; 308 break;
309 } 309 }
310 } 310 }
311 311
312 void RecordIconActivatedAction(const ui::Event& event) { 312 void RecordIconActivatedAction(const ui::Event& event) {
313 if (event.IsMouseEvent()) 313 if (event.IsMouseEvent()) {
314 Shell::GetInstance()->metrics()->RecordUserMetricsAction( 314 Shell::GetInstance()->metrics()->RecordUserMetricsAction(
315 UMA_LAUNCHER_BUTTON_PRESSED_WITH_MOUSE); 315 UMA_LAUNCHER_BUTTON_PRESSED_WITH_MOUSE);
316 else if (event.IsGestureEvent()) 316 } else if (event.IsGestureEvent()) {
317 Shell::GetInstance()->metrics()->RecordUserMetricsAction( 317 Shell::GetInstance()->metrics()->RecordUserMetricsAction(
318 UMA_LAUNCHER_BUTTON_PRESSED_WITH_TOUCH); 318 UMA_LAUNCHER_BUTTON_PRESSED_WITH_TOUCH);
319 }
319 } 320 }
320 321
321 } // namespace 322 } // namespace
322 323
323 // AnimationDelegate used when deleting an item. This steadily decreased the 324 // AnimationDelegate used when deleting an item. This steadily decreased the
324 // opacity of the layer as the animation progress. 325 // opacity of the layer as the animation progress.
325 class ShelfView::FadeOutAnimationDelegate : public gfx::AnimationDelegate { 326 class ShelfView::FadeOutAnimationDelegate : public gfx::AnimationDelegate {
326 public: 327 public:
327 FadeOutAnimationDelegate(ShelfView* host, views::View* view) 328 FadeOutAnimationDelegate(ShelfView* host, views::View* view)
328 : shelf_view_(host), 329 : shelf_view_(host),
(...skipping 1644 matching lines...) Expand 10 before | Expand all | Expand 10 after
1973 distance = bounds.x() - coordinate.x(); 1974 distance = bounds.x() - coordinate.x();
1974 break; 1975 break;
1975 case SHELF_ALIGNMENT_TOP: 1976 case SHELF_ALIGNMENT_TOP:
1976 distance = coordinate.y() - bounds.bottom(); 1977 distance = coordinate.y() - bounds.bottom();
1977 break; 1978 break;
1978 } 1979 }
1979 return distance > 0 ? distance : 0; 1980 return distance > 0 ? distance : 0;
1980 } 1981 }
1981 1982
1982 } // namespace ash 1983 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698