| OLD | NEW |
| 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/launcher/launcher_view.h" | 5 #include "ash/launcher/launcher_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/launcher/app_list_button.h" | 10 #include "ash/launcher/app_list_button.h" |
| (...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 781 OnLauncherIconPositionsChanged()); | 781 OnLauncherIconPositionsChanged()); |
| 782 | 782 |
| 783 if (IsShowingOverflowBubble()) | 783 if (IsShowingOverflowBubble()) |
| 784 overflow_bubble_->Hide(); | 784 overflow_bubble_->Hide(); |
| 785 } | 785 } |
| 786 | 786 |
| 787 views::FocusTraversable* LauncherView::GetPaneFocusTraversable() { | 787 views::FocusTraversable* LauncherView::GetPaneFocusTraversable() { |
| 788 return this; | 788 return this; |
| 789 } | 789 } |
| 790 | 790 |
| 791 ui::EventResult LauncherView::OnGestureEvent(ui::GestureEvent* event) { | 791 void LauncherView::OnGestureEvent(ui::GestureEvent* event) { |
| 792 return gesture_handler_.ProcessGestureEvent(*event) ? | 792 if (gesture_handler_.ProcessGestureEvent(*event)) |
| 793 ui::ER_CONSUMED : ui::ER_UNHANDLED; | 793 event->StopPropagation(); |
| 794 } | 794 } |
| 795 | 795 |
| 796 void LauncherView::LauncherItemAdded(int model_index) { | 796 void LauncherView::LauncherItemAdded(int model_index) { |
| 797 model_index = CancelDrag(model_index); | 797 model_index = CancelDrag(model_index); |
| 798 views::View* view = CreateViewForItem(model_->items()[model_index]); | 798 views::View* view = CreateViewForItem(model_->items()[model_index]); |
| 799 AddChildView(view); | 799 AddChildView(view); |
| 800 // Hide the view, it'll be made visible when the animation is done. Using | 800 // Hide the view, it'll be made visible when the animation is done. Using |
| 801 // opacity 0 here to avoid messing with CalculateIdealBounds which touches | 801 // opacity 0 here to avoid messing with CalculateIdealBounds which touches |
| 802 // the view's visibility. | 802 // the view's visibility. |
| 803 view->layer()->SetOpacity(0); | 803 view->layer()->SetOpacity(0); |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1087 FOR_EACH_OBSERVER(LauncherIconObserver, observers_, | 1087 FOR_EACH_OBSERVER(LauncherIconObserver, observers_, |
| 1088 OnLauncherIconPositionsChanged()); | 1088 OnLauncherIconPositionsChanged()); |
| 1089 PreferredSizeChanged(); | 1089 PreferredSizeChanged(); |
| 1090 } | 1090 } |
| 1091 | 1091 |
| 1092 void LauncherView::OnBoundsAnimatorDone(views::BoundsAnimator* animator) { | 1092 void LauncherView::OnBoundsAnimatorDone(views::BoundsAnimator* animator) { |
| 1093 } | 1093 } |
| 1094 | 1094 |
| 1095 } // namespace internal | 1095 } // namespace internal |
| 1096 } // namespace ash | 1096 } // namespace ash |
| OLD | NEW |