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

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

Issue 15862014: Turning on drag and drop from app list to launcher by default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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/ash_switches.cc ('k') | chrome/app/generated_resources.grd » ('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 <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/ash_constants.h" 9 #include "ash/ash_constants.h"
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after
1475 case TYPE_APP_PANEL: 1475 case TYPE_APP_PANEL:
1476 delegate_->ItemSelected(model_->items()[view_index], event); 1476 delegate_->ItemSelected(model_->items()[view_index], event);
1477 break; 1477 break;
1478 1478
1479 case TYPE_APP_LIST: 1479 case TYPE_APP_LIST:
1480 Shell::GetInstance()->delegate()->RecordUserMetricsAction( 1480 Shell::GetInstance()->delegate()->RecordUserMetricsAction(
1481 UMA_LAUNCHER_CLICK_ON_APPLIST_BUTTON); 1481 UMA_LAUNCHER_CLICK_ON_APPLIST_BUTTON);
1482 Shell::GetInstance()->ToggleAppList(GetWidget()->GetNativeView()); 1482 Shell::GetInstance()->ToggleAppList(GetWidget()->GetNativeView());
1483 // By setting us as DnD recipient, the app list knows that we can 1483 // By setting us as DnD recipient, the app list knows that we can
1484 // handle items. 1484 // handle items.
1485 if (CommandLine::ForCurrentProcess()->HasSwitch( 1485 if (!CommandLine::ForCurrentProcess()->HasSwitch(
1486 ash::switches::kAshDragAndDropAppListToLauncher)) 1486 ash::switches::kAshDisableDragAndDropAppListToLauncher))
1487 Shell::GetInstance()->SetDragAndDropHostOfCurrentAppList(this); 1487 Shell::GetInstance()->SetDragAndDropHostOfCurrentAppList(this);
1488 break; 1488 break;
1489 } 1489 }
1490 } 1490 }
1491 1491
1492 if (model_->items()[view_index].type != TYPE_APP_LIST) 1492 if (model_->items()[view_index].type != TYPE_APP_LIST)
1493 ShowListMenuForView(model_->items()[view_index], sender, event.flags()); 1493 ShowListMenuForView(model_->items()[view_index], sender, event.flags());
1494 } 1494 }
1495 1495
1496 bool LauncherView::ShowListMenuForView(const LauncherItem& item, 1496 bool LauncherView::ShowListMenuForView(const LauncherItem& item,
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
1643 bool LauncherView::ShouldShowTooltipForView(const views::View* view) const { 1643 bool LauncherView::ShouldShowTooltipForView(const views::View* view) const {
1644 if (view == GetAppListButtonView() && 1644 if (view == GetAppListButtonView() &&
1645 Shell::GetInstance()->GetAppListWindow()) 1645 Shell::GetInstance()->GetAppListWindow())
1646 return false; 1646 return false;
1647 const LauncherItem* item = LauncherItemForView(view); 1647 const LauncherItem* item = LauncherItemForView(view);
1648 return (!item || delegate_->ShouldShowTooltip(*item)); 1648 return (!item || delegate_->ShouldShowTooltip(*item));
1649 } 1649 }
1650 1650
1651 } // namespace internal 1651 } // namespace internal
1652 } // namespace ash 1652 } // namespace ash
OLDNEW
« no previous file with comments | « ash/ash_switches.cc ('k') | chrome/app/generated_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698