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 "chrome/browser/ui/views/ash/chrome_shell_delegate.h" | 5 #include "chrome/browser/ui/views/ash/chrome_shell_delegate.h" |
6 | 6 |
7 #include "ash/launcher/launcher_types.h" | 7 #include "ash/launcher/launcher_types.h" |
8 #include "ash/system/tray/system_tray_delegate.h" | 8 #include "ash/system/tray/system_tray_delegate.h" |
9 #include "ash/wm/window_util.h" | 9 #include "ash/wm/window_util.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 break; | 346 break; |
347 case ash::UMA_ACCEL_SEARCH_LWIN: | 347 case ash::UMA_ACCEL_SEARCH_LWIN: |
348 content::RecordAction(content::UserMetricsAction("Accel_Search_LWin")); | 348 content::RecordAction(content::UserMetricsAction("Accel_Search_LWin")); |
349 break; | 349 break; |
350 case ash::UMA_MOUSE_DOWN: | 350 case ash::UMA_MOUSE_DOWN: |
351 content::RecordAction(content::UserMetricsAction("Mouse_Down")); | 351 content::RecordAction(content::UserMetricsAction("Mouse_Down")); |
352 break; | 352 break; |
353 case ash::UMA_TOUCHSCREEN_TAP_DOWN: | 353 case ash::UMA_TOUCHSCREEN_TAP_DOWN: |
354 content::RecordAction(content::UserMetricsAction("Touchscreen_Down")); | 354 content::RecordAction(content::UserMetricsAction("Touchscreen_Down")); |
355 break; | 355 break; |
| 356 case ash::UMA_LAUNCHER_CLICK_ON_APPLIST_BUTTON: |
| 357 content::RecordAction( |
| 358 content::UserMetricsAction("Launcher_ClickOnApplistButton")); |
| 359 break; |
| 360 case ash::UMA_LAUNCHER_CLICK_ON_APP: |
| 361 content::RecordAction(content::UserMetricsAction("Launcher_ClickOnApp")); |
| 362 break; |
356 } | 363 } |
357 } | 364 } |
358 | 365 |
359 void ChromeShellDelegate::Observe(int type, | 366 void ChromeShellDelegate::Observe(int type, |
360 const content::NotificationSource& source, | 367 const content::NotificationSource& source, |
361 const content::NotificationDetails& details) { | 368 const content::NotificationDetails& details) { |
362 #if defined(OS_CHROMEOS) | 369 #if defined(OS_CHROMEOS) |
363 switch (type) { | 370 switch (type) { |
364 case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED: | 371 case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED: |
365 ash::Shell::GetInstance()->CreateLauncher(); | 372 ash::Shell::GetInstance()->CreateLauncher(); |
366 break; | 373 break; |
367 case chrome::NOTIFICATION_SESSION_STARTED: | 374 case chrome::NOTIFICATION_SESSION_STARTED: |
368 ash::Shell::GetInstance()->ShowLauncher(); | 375 ash::Shell::GetInstance()->ShowLauncher(); |
369 break; | 376 break; |
370 default: | 377 default: |
371 NOTREACHED() << "Unexpected notification " << type; | 378 NOTREACHED() << "Unexpected notification " << type; |
372 } | 379 } |
373 #else | 380 #else |
374 // MSVC++ warns about switch statements without any cases. | 381 // MSVC++ warns about switch statements without any cases. |
375 NOTREACHED() << "Unexpected notification " << type; | 382 NOTREACHED() << "Unexpected notification " << type; |
376 #endif | 383 #endif |
377 } | 384 } |
OLD | NEW |