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

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

Issue 13007002: Create launcher app list for shell windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add browser tests Created 7 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
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 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1350 case TYPE_WINDOWED_APP: 1350 case TYPE_WINDOWED_APP:
1351 case TYPE_PLATFORM_APP: 1351 case TYPE_PLATFORM_APP:
1352 Shell::GetInstance()->delegate()->RecordUserMetricsAction( 1352 Shell::GetInstance()->delegate()->RecordUserMetricsAction(
1353 UMA_LAUNCHER_CLICK_ON_APP); 1353 UMA_LAUNCHER_CLICK_ON_APP);
1354 // Fallthrough 1354 // Fallthrough
1355 case TYPE_TABBED: 1355 case TYPE_TABBED:
1356 case TYPE_APP_PANEL: 1356 case TYPE_APP_PANEL:
1357 delegate_->ItemClicked(model_->items()[view_index], event); 1357 delegate_->ItemClicked(model_->items()[view_index], event);
1358 break; 1358 break;
1359 1359
1360 case TYPE_APP_LIST: 1360 case TYPE_APP_LIST:
1361 Shell::GetInstance()->delegate()->RecordUserMetricsAction( 1361 Shell::GetInstance()->delegate()->RecordUserMetricsAction(
1362 UMA_LAUNCHER_CLICK_ON_APPLIST_BUTTON); 1362 UMA_LAUNCHER_CLICK_ON_APPLIST_BUTTON);
1363 Shell::GetInstance()->ToggleAppList(GetWidget()->GetNativeView()); 1363 Shell::GetInstance()->ToggleAppList(GetWidget()->GetNativeView());
1364 break; 1364 break;
1365 1365
1366 case TYPE_BROWSER_SHORTCUT: 1366 case TYPE_BROWSER_SHORTCUT:
1367 // Click on browser icon is counted in app clicks. 1367 // Click on browser icon is counted in app clicks.
1368 Shell::GetInstance()->delegate()->RecordUserMetricsAction( 1368 Shell::GetInstance()->delegate()->RecordUserMetricsAction(
1369 UMA_LAUNCHER_CLICK_ON_APP); 1369 UMA_LAUNCHER_CLICK_ON_APP);
1370 delegate_->OnBrowserShortcutClicked(event.flags()); 1370 delegate_->OnBrowserShortcutClicked(event.flags());
1371 break; 1371 break;
Mr4D (OOO till 08-26) 2013/03/22 00:45:31 That is totally odd. I have fixed this already sev
1372 } 1372 }
1373 } 1373 }
1374 1374
1375 if (model_->items()[view_index].type != TYPE_APP_LIST) 1375 if (model_->items()[view_index].type != TYPE_APP_LIST)
1376 ShowListMenuForView(model_->items()[view_index], sender, event.flags()); 1376 ShowListMenuForView(model_->items()[view_index], sender, event.flags());
1377 } 1377 }
1378 1378
1379 bool LauncherView::ShowListMenuForView(const LauncherItem& item, 1379 bool LauncherView::ShowListMenuForView(const LauncherItem& item,
1380 views::View* source, 1380 views::View* source,
1381 int event_flags) { 1381 int event_flags) {
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1496 base::TimeDelta delta = 1496 base::TimeDelta delta =
1497 base::TimeDelta(event.time_stamp() - closing_event_time_); 1497 base::TimeDelta(event.time_stamp() - closing_event_time_);
1498 closing_event_time_ = base::TimeDelta(); 1498 closing_event_time_ = base::TimeDelta();
1499 // TODO(skuhne): This time seems excessive, but it appears that the reposting 1499 // TODO(skuhne): This time seems excessive, but it appears that the reposting
1500 // takes that long. Need to come up with a better way of doing this. 1500 // takes that long. Need to come up with a better way of doing this.
1501 return (delta.InMilliseconds() < 0 || delta.InMilliseconds() > 130); 1501 return (delta.InMilliseconds() < 0 || delta.InMilliseconds() > 130);
1502 } 1502 }
1503 1503
1504 } // namespace internal 1504 } // namespace internal
1505 } // namespace ash 1505 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698