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/launcher_button.h" | 9 #include "ash/launcher/launcher_button.h" |
10 #include "ash/launcher/launcher_delegate.h" | 10 #include "ash/launcher/launcher_delegate.h" |
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
620 // |view_model_| update. | 620 // |view_model_| update. |
621 model_->Move(current_index, target_index); | 621 model_->Move(current_index, target_index); |
622 bounds_animator_->StopAnimatingView(drag_view_); | 622 bounds_animator_->StopAnimatingView(drag_view_); |
623 } | 623 } |
624 | 624 |
625 bool LauncherView::SameDragType(LauncherItemType typea, | 625 bool LauncherView::SameDragType(LauncherItemType typea, |
626 LauncherItemType typeb) const { | 626 LauncherItemType typeb) const { |
627 switch (typea) { | 627 switch (typea) { |
628 case TYPE_TABBED: | 628 case TYPE_TABBED: |
629 case TYPE_APP_PANEL: | 629 case TYPE_APP_PANEL: |
630 return (typeb == TYPE_TABBED || typeb == TYPE_APP_PANEL); | 630 case TYPE_PLATFORM_APP: |
| 631 return (typeb == TYPE_TABBED || |
| 632 typeb == TYPE_APP_PANEL || |
| 633 typeb == TYPE_PLATFORM_APP); |
631 case TYPE_APP_SHORTCUT: | 634 case TYPE_APP_SHORTCUT: |
632 case TYPE_APP_LIST: | 635 case TYPE_APP_LIST: |
633 case TYPE_BROWSER_SHORTCUT: | 636 case TYPE_BROWSER_SHORTCUT: |
634 case TYPE_PLATFORM_APP: | |
635 return typeb == typea; | 637 return typeb == typea; |
636 } | 638 } |
637 NOTREACHED(); | 639 NOTREACHED(); |
638 return false; | 640 return false; |
639 } | 641 } |
640 | 642 |
641 std::pair<int, int> LauncherView::GetDragRange(int index) { | 643 std::pair<int, int> LauncherView::GetDragRange(int index) { |
642 int min_index = -1; | 644 int min_index = -1; |
643 int max_index = -1; | 645 int max_index = -1; |
644 LauncherItemType type = model_->items()[index].type; | 646 LauncherItemType type = model_->items()[index].type; |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1015 source->GetWidget(), NULL, gfx::Rect(point, gfx::Size()), | 1017 source->GetWidget(), NULL, gfx::Rect(point, gfx::Size()), |
1016 views::MenuItemView::TOPLEFT, 0) == views::MenuRunner::MENU_DELETED) | 1018 views::MenuItemView::TOPLEFT, 0) == views::MenuRunner::MENU_DELETED) |
1017 return; | 1019 return; |
1018 | 1020 |
1019 Shell::GetInstance()->UpdateShelfVisibility(); | 1021 Shell::GetInstance()->UpdateShelfVisibility(); |
1020 #endif | 1022 #endif |
1021 } | 1023 } |
1022 | 1024 |
1023 } // namespace internal | 1025 } // namespace internal |
1024 } // namespace ash | 1026 } // namespace ash |
OLD | NEW |