| 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/ash_constants.h" | 9 #include "ash/ash_constants.h" |
| 10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
| (...skipping 1330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1341 case TYPE_WINDOWED_APP: | 1341 case TYPE_WINDOWED_APP: |
| 1342 case TYPE_PLATFORM_APP: | 1342 case TYPE_PLATFORM_APP: |
| 1343 Shell::GetInstance()->delegate()->RecordUserMetricsAction( | 1343 Shell::GetInstance()->delegate()->RecordUserMetricsAction( |
| 1344 UMA_LAUNCHER_CLICK_ON_APP); | 1344 UMA_LAUNCHER_CLICK_ON_APP); |
| 1345 // Fallthrough | 1345 // Fallthrough |
| 1346 case TYPE_TABBED: | 1346 case TYPE_TABBED: |
| 1347 case TYPE_APP_PANEL: | 1347 case TYPE_APP_PANEL: |
| 1348 delegate_->ItemClicked(model_->items()[view_index], event); | 1348 delegate_->ItemClicked(model_->items()[view_index], event); |
| 1349 break; | 1349 break; |
| 1350 | 1350 |
| 1351 case TYPE_APP_LIST: | 1351 case TYPE_APP_LIST: |
| 1352 Shell::GetInstance()->delegate()->RecordUserMetricsAction( | 1352 Shell::GetInstance()->delegate()->RecordUserMetricsAction( |
| 1353 UMA_LAUNCHER_CLICK_ON_APPLIST_BUTTON); | 1353 UMA_LAUNCHER_CLICK_ON_APPLIST_BUTTON); |
| 1354 Shell::GetInstance()->ToggleAppList(GetWidget()->GetNativeView()); | 1354 Shell::GetInstance()->ToggleAppList(GetWidget()->GetNativeView()); |
| 1355 break; | 1355 break; |
| 1356 | 1356 |
| 1357 case TYPE_BROWSER_SHORTCUT: | 1357 case TYPE_BROWSER_SHORTCUT: |
| 1358 // Click on browser icon is counted in app clicks. | 1358 // Click on browser icon is counted in app clicks. |
| 1359 Shell::GetInstance()->delegate()->RecordUserMetricsAction( | 1359 Shell::GetInstance()->delegate()->RecordUserMetricsAction( |
| 1360 UMA_LAUNCHER_CLICK_ON_APP); | 1360 UMA_LAUNCHER_CLICK_ON_APP); |
| 1361 delegate_->OnBrowserShortcutClicked(event.flags()); | 1361 delegate_->OnBrowserShortcutClicked(event.flags()); |
| 1362 break; | 1362 break; |
| 1363 } | 1363 } |
| 1364 } | 1364 } |
| 1365 | 1365 |
| 1366 if (model_->items()[view_index].type != TYPE_APP_LIST) | 1366 if (model_->items()[view_index].type != TYPE_APP_LIST) |
| 1367 ShowListMenuForView(model_->items()[view_index], sender, event.flags()); | 1367 ShowListMenuForView(model_->items()[view_index], sender, event.flags()); |
| 1368 } | 1368 } |
| 1369 | 1369 |
| 1370 bool LauncherView::ShowListMenuForView(const LauncherItem& item, | 1370 bool LauncherView::ShowListMenuForView(const LauncherItem& item, |
| 1371 views::View* source, | 1371 views::View* source, |
| 1372 int event_flags) { | 1372 int event_flags) { |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1503 bool LauncherView::ShouldShowTooltipForView(const views::View* view) const { | 1503 bool LauncherView::ShouldShowTooltipForView(const views::View* view) const { |
| 1504 if (view == GetAppListButtonView() && | 1504 if (view == GetAppListButtonView() && |
| 1505 Shell::GetInstance()->GetAppListWindow()) | 1505 Shell::GetInstance()->GetAppListWindow()) |
| 1506 return false; | 1506 return false; |
| 1507 const LauncherItem* item = LauncherItemForView(view); | 1507 const LauncherItem* item = LauncherItemForView(view); |
| 1508 return (!item || delegate_->ShouldShowTooltip(*item)); | 1508 return (!item || delegate_->ShouldShowTooltip(*item)); |
| 1509 } | 1509 } |
| 1510 | 1510 |
| 1511 } // namespace internal | 1511 } // namespace internal |
| 1512 } // namespace ash | 1512 } // namespace ash |
| OLD | NEW |