| 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 "ash/launcher/launcher_button.h" | 7 #include "ash/launcher/launcher_button.h" |
| 8 #include "ash/launcher/launcher_delegate.h" | 8 #include "ash/launcher/launcher_delegate.h" |
| 9 #include "ash/launcher/launcher_model.h" | 9 #include "ash/launcher/launcher_model.h" |
| 10 #include "ash/launcher/launcher_window_cycler.h" | 10 #include "ash/launcher/launcher_window_cycler.h" |
| (...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 return l10n_util::GetStringUTF16(IDS_AURA_APP_LIST_TITLE); | 687 return l10n_util::GetStringUTF16(IDS_AURA_APP_LIST_TITLE); |
| 688 | 688 |
| 689 case TYPE_BROWSER_SHORTCUT: | 689 case TYPE_BROWSER_SHORTCUT: |
| 690 return l10n_util::GetStringUTF16(IDS_AURA_CYCLER_TITLE); | 690 return l10n_util::GetStringUTF16(IDS_AURA_CYCLER_TITLE); |
| 691 } | 691 } |
| 692 return string16(); | 692 return string16(); |
| 693 } | 693 } |
| 694 | 694 |
| 695 void LauncherView::ButtonPressed(views::Button* sender, | 695 void LauncherView::ButtonPressed(views::Button* sender, |
| 696 const views::Event& event) { | 696 const views::Event& event) { |
| 697 // Do not handle mouse release during drag. |
| 698 if (dragging_) |
| 699 return; |
| 700 |
| 697 if (sender == overflow_button_) | 701 if (sender == overflow_button_) |
| 698 ShowOverflowMenu(); | 702 ShowOverflowMenu(); |
| 699 | 703 |
| 700 if (!delegate_) | 704 if (!delegate_) |
| 701 return; | 705 return; |
| 702 int view_index = view_model_->GetIndexOfView(sender); | 706 int view_index = view_model_->GetIndexOfView(sender); |
| 703 // May be -1 while in the process of animating closed. | 707 // May be -1 while in the process of animating closed. |
| 704 if (view_index == -1) | 708 if (view_index == -1) |
| 705 return; | 709 return; |
| 706 | 710 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 // code. | 748 // code. |
| 745 if (launcher_menu_runner_->RunMenuAt( | 749 if (launcher_menu_runner_->RunMenuAt( |
| 746 source->GetWidget(), NULL, gfx::Rect(point, gfx::Size()), | 750 source->GetWidget(), NULL, gfx::Rect(point, gfx::Size()), |
| 747 views::MenuItemView::TOPLEFT, 0) == views::MenuRunner::MENU_DELETED) | 751 views::MenuItemView::TOPLEFT, 0) == views::MenuRunner::MENU_DELETED) |
| 748 return; | 752 return; |
| 749 #endif | 753 #endif |
| 750 } | 754 } |
| 751 | 755 |
| 752 } // namespace internal | 756 } // namespace internal |
| 753 } // namespace ash | 757 } // namespace ash |
| OLD | NEW |