| 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/tabbed_launcher_button.h" | 10 #include "ash/launcher/tabbed_launcher_button.h" |
| (...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 case TYPE_APP: | 713 case TYPE_APP: |
| 714 case TYPE_APP_SHORTCUT: | 714 case TYPE_APP_SHORTCUT: |
| 715 delegate_->ItemClicked(model_->items()[view_index]); | 715 delegate_->ItemClicked(model_->items()[view_index]); |
| 716 break; | 716 break; |
| 717 | 717 |
| 718 case TYPE_APP_LIST: | 718 case TYPE_APP_LIST: |
| 719 Shell::GetInstance()->ToggleAppList(); | 719 Shell::GetInstance()->ToggleAppList(); |
| 720 break; | 720 break; |
| 721 | 721 |
| 722 case TYPE_BROWSER_SHORTCUT: | 722 case TYPE_BROWSER_SHORTCUT: |
| 723 delegate_->CreateNewWindow(); | 723 delegate_->CreateNewTab(); |
| 724 break; | 724 break; |
| 725 } | 725 } |
| 726 } | 726 } |
| 727 | 727 |
| 728 void LauncherView::ShowContextMenuForView(views::View* source, | 728 void LauncherView::ShowContextMenuForView(views::View* source, |
| 729 const gfx::Point& point) { | 729 const gfx::Point& point) { |
| 730 int view_index = view_model_->GetIndexOfView(source); | 730 int view_index = view_model_->GetIndexOfView(source); |
| 731 // May be -1 while in the process of animating closed. | 731 // May be -1 while in the process of animating closed. |
| 732 if (view_index == -1 || !delegate_) | 732 if (view_index == -1 || !delegate_) |
| 733 return; | 733 return; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 746 // code. | 746 // code. |
| 747 if (launcher_menu_runner_->RunMenuAt( | 747 if (launcher_menu_runner_->RunMenuAt( |
| 748 source->GetWidget(), NULL, gfx::Rect(point, gfx::Size()), | 748 source->GetWidget(), NULL, gfx::Rect(point, gfx::Size()), |
| 749 views::MenuItemView::TOPLEFT, 0) == views::MenuRunner::MENU_DELETED) | 749 views::MenuItemView::TOPLEFT, 0) == views::MenuRunner::MENU_DELETED) |
| 750 return; | 750 return; |
| 751 #endif | 751 #endif |
| 752 } | 752 } |
| 753 | 753 |
| 754 } // namespace internal | 754 } // namespace internal |
| 755 } // namespace ash | 755 } // namespace ash |
| OLD | NEW |