Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(310)

Side by Side Diff: ash/launcher/launcher_view.cc

Issue 9835081: Change the launcher to create new tabs instead of windows when (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/launcher/launcher_delegate.h ('k') | ash/shell/launcher_delegate_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ash/launcher/launcher_delegate.h ('k') | ash/shell/launcher_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698