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/browser_command_controller.h" | 5 #include "chrome/browser/ui/browser_command_controller.h" |
6 | 6 |
7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
8 #include "chrome/app/chrome_command_ids.h" | 8 #include "chrome/app/chrome_command_ids.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 #include "base/win/windows_version.h" | 50 #include "base/win/windows_version.h" |
51 #include "chrome/browser/ui/apps/apps_metro_handler_win.h" | 51 #include "chrome/browser/ui/apps/apps_metro_handler_win.h" |
52 #endif | 52 #endif |
53 | 53 |
54 #if defined(USE_ASH) | 54 #if defined(USE_ASH) |
55 #include "ash/accelerators/accelerator_commands.h" | 55 #include "ash/accelerators/accelerator_commands.h" |
56 #include "chrome/browser/ui/ash/ash_util.h" | 56 #include "chrome/browser/ui/ash/ash_util.h" |
57 #endif | 57 #endif |
58 | 58 |
59 #if defined(OS_CHROMEOS) | 59 #if defined(OS_CHROMEOS) |
| 60 #include "ash/multi_profile_uma.h" |
60 #include "ash/session_state_delegate.h" | 61 #include "ash/session_state_delegate.h" |
61 #include "ash/shell.h" | 62 #include "ash/shell.h" |
62 #include "chrome/browser/ui/ash/multi_user_window_manager.h" | 63 #include "chrome/browser/ui/ash/multi_user_window_manager.h" |
63 #endif | 64 #endif |
64 | 65 |
65 using content::NavigationEntry; | 66 using content::NavigationEntry; |
66 using content::NavigationController; | 67 using content::NavigationController; |
67 using content::WebContents; | 68 using content::WebContents; |
68 | 69 |
69 namespace { | 70 namespace { |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 case IDC_MINIMIZE_WINDOW: | 456 case IDC_MINIMIZE_WINDOW: |
456 ash::accelerators::ToggleMinimized(); | 457 ash::accelerators::ToggleMinimized(); |
457 break; | 458 break; |
458 // If Ash needs many more commands here we should implement a general | 459 // If Ash needs many more commands here we should implement a general |
459 // mechanism to pass accelerators back into Ash. http://crbug.com/285308 | 460 // mechanism to pass accelerators back into Ash. http://crbug.com/285308 |
460 #endif | 461 #endif |
461 | 462 |
462 #if defined(OS_CHROMEOS) | 463 #if defined(OS_CHROMEOS) |
463 case IDC_VISIT_DESKTOP_OF_LRU_USER_2: | 464 case IDC_VISIT_DESKTOP_OF_LRU_USER_2: |
464 case IDC_VISIT_DESKTOP_OF_LRU_USER_3: { | 465 case IDC_VISIT_DESKTOP_OF_LRU_USER_3: { |
| 466 ash::MultiProfileUMA::RecordTeleportAction( |
| 467 ash::MultiProfileUMA::TELEPORT_WINDOW_CAPTION_MENU); |
465 // When running the multi user mode on Chrome OS, windows can "visit" | 468 // When running the multi user mode on Chrome OS, windows can "visit" |
466 // another user's desktop. | 469 // another user's desktop. |
467 const std::string& user_id = | 470 const std::string& user_id = |
468 ash::Shell::GetInstance()->session_state_delegate()->GetUserID( | 471 ash::Shell::GetInstance()->session_state_delegate()->GetUserID( |
469 IDC_VISIT_DESKTOP_OF_LRU_USER_2 == id ? 1 : 2); | 472 IDC_VISIT_DESKTOP_OF_LRU_USER_2 == id ? 1 : 2); |
470 chrome::MultiUserWindowManager::GetInstance()->ShowWindowForUser( | 473 chrome::MultiUserWindowManager::GetInstance()->ShowWindowForUser( |
471 browser_->window()->GetNativeWindow(), | 474 browser_->window()->GetNativeWindow(), |
472 user_id); | 475 user_id); |
473 break; | 476 break; |
474 } | 477 } |
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1307 | 1310 |
1308 BrowserWindow* BrowserCommandController::window() { | 1311 BrowserWindow* BrowserCommandController::window() { |
1309 return browser_->window(); | 1312 return browser_->window(); |
1310 } | 1313 } |
1311 | 1314 |
1312 Profile* BrowserCommandController::profile() { | 1315 Profile* BrowserCommandController::profile() { |
1313 return browser_->profile(); | 1316 return browser_->profile(); |
1314 } | 1317 } |
1315 | 1318 |
1316 } // namespace chrome | 1319 } // namespace chrome |
OLD | NEW |