| 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/launcher/app_list_button.h" | 9 #include "ash/launcher/app_list_button.h" |
| 10 #include "ash/launcher/launcher_button.h" | 10 #include "ash/launcher/launcher_button.h" |
| (...skipping 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1052 AutoReset<LauncherID> reseter( | 1052 AutoReset<LauncherID> reseter( |
| 1053 &context_menu_id_, | 1053 &context_menu_id_, |
| 1054 view_index == -1 ? 0 : model_->items()[view_index].id); | 1054 view_index == -1 ? 0 : model_->items()[view_index].id); |
| 1055 views::MenuModelAdapter menu_model_adapter(menu_model.get()); | 1055 views::MenuModelAdapter menu_model_adapter(menu_model.get()); |
| 1056 launcher_menu_runner_.reset( | 1056 launcher_menu_runner_.reset( |
| 1057 new views::MenuRunner(menu_model_adapter.CreateMenu())); | 1057 new views::MenuRunner(menu_model_adapter.CreateMenu())); |
| 1058 // NOTE: if you convert to HAS_MNEMONICS be sure and update menu building | 1058 // NOTE: if you convert to HAS_MNEMONICS be sure and update menu building |
| 1059 // code. | 1059 // code. |
| 1060 if (launcher_menu_runner_->RunMenuAt( | 1060 if (launcher_menu_runner_->RunMenuAt( |
| 1061 source->GetWidget(), NULL, gfx::Rect(point, gfx::Size()), | 1061 source->GetWidget(), NULL, gfx::Rect(point, gfx::Size()), |
| 1062 views::MenuItemView::TOPLEFT, 0) == views::MenuRunner::MENU_DELETED) | 1062 views::MenuItemView::TOPLEFT, views::MenuRunner::CONTEXT_MENU) == |
| 1063 views::MenuRunner::MENU_DELETED) |
| 1063 return; | 1064 return; |
| 1064 | 1065 |
| 1065 Shell::GetInstance()->UpdateShelfVisibility(); | 1066 Shell::GetInstance()->UpdateShelfVisibility(); |
| 1066 #endif | 1067 #endif |
| 1067 } | 1068 } |
| 1068 | 1069 |
| 1069 void LauncherView::OnBoundsAnimatorProgressed(views::BoundsAnimator* animator) { | 1070 void LauncherView::OnBoundsAnimatorProgressed(views::BoundsAnimator* animator) { |
| 1070 FOR_EACH_OBSERVER(LauncherIconObserver, observers_, | 1071 FOR_EACH_OBSERVER(LauncherIconObserver, observers_, |
| 1071 OnLauncherIconPositionsChanged()); | 1072 OnLauncherIconPositionsChanged()); |
| 1072 PreferredSizeChanged(); | 1073 PreferredSizeChanged(); |
| 1073 } | 1074 } |
| 1074 | 1075 |
| 1075 void LauncherView::OnBoundsAnimatorDone(views::BoundsAnimator* animator) { | 1076 void LauncherView::OnBoundsAnimatorDone(views::BoundsAnimator* animator) { |
| 1076 } | 1077 } |
| 1077 | 1078 |
| 1078 } // namespace internal | 1079 } // namespace internal |
| 1079 } // namespace ash | 1080 } // namespace ash |
| OLD | NEW |