| 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/command_line.h" | 7 #include "base/command_line.h" | 
| 8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" | 
| 9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" | 
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" | 
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 56 | 56 | 
| 57 #if defined(USE_ASH) | 57 #if defined(USE_ASH) | 
| 58 #include "ash/accelerators/accelerator_commands.h" | 58 #include "ash/accelerators/accelerator_commands.h" | 
| 59 #include "chrome/browser/ui/ash/ash_util.h" | 59 #include "chrome/browser/ui/ash/ash_util.h" | 
| 60 #endif | 60 #endif | 
| 61 | 61 | 
| 62 #if defined(OS_CHROMEOS) | 62 #if defined(OS_CHROMEOS) | 
| 63 #include "ash/multi_profile_uma.h" | 63 #include "ash/multi_profile_uma.h" | 
| 64 #include "ash/session_state_delegate.h" | 64 #include "ash/session_state_delegate.h" | 
| 65 #include "ash/shell.h" | 65 #include "ash/shell.h" | 
|  | 66 #include "chrome/browser/ui/ash/multi_user/multi_user_context_menu.h" | 
| 66 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h" | 67 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h" | 
| 67 #include "chrome/browser/ui/browser_commands_chromeos.h" | 68 #include "chrome/browser/ui/browser_commands_chromeos.h" | 
| 68 #endif | 69 #endif | 
| 69 | 70 | 
| 70 using content::NavigationEntry; | 71 using content::NavigationEntry; | 
| 71 using content::NavigationController; | 72 using content::NavigationController; | 
| 72 using content::WebContents; | 73 using content::WebContents; | 
| 73 | 74 | 
| 74 namespace { | 75 namespace { | 
| 75 | 76 | 
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 461       content::RecordAction( | 462       content::RecordAction( | 
| 462           base::UserMetricsAction("Accel_Toggle_Minimized_M")); | 463           base::UserMetricsAction("Accel_Toggle_Minimized_M")); | 
| 463       ash::accelerators::ToggleMinimized(); | 464       ash::accelerators::ToggleMinimized(); | 
| 464       break; | 465       break; | 
| 465     // If Ash needs many more commands here we should implement a general | 466     // If Ash needs many more commands here we should implement a general | 
| 466     // mechanism to pass accelerators back into Ash. http://crbug.com/285308 | 467     // mechanism to pass accelerators back into Ash. http://crbug.com/285308 | 
| 467 #endif | 468 #endif | 
| 468 | 469 | 
| 469 #if defined(OS_CHROMEOS) | 470 #if defined(OS_CHROMEOS) | 
| 470     case IDC_VISIT_DESKTOP_OF_LRU_USER_2: | 471     case IDC_VISIT_DESKTOP_OF_LRU_USER_2: | 
| 471     case IDC_VISIT_DESKTOP_OF_LRU_USER_3: { | 472     case IDC_VISIT_DESKTOP_OF_LRU_USER_3: | 
| 472         ash::MultiProfileUMA::RecordTeleportAction( | 473       ExecuteVisitDesktopCommand(id, browser_->window()->GetNativeWindow()); | 
| 473             ash::MultiProfileUMA::TELEPORT_WINDOW_CAPTION_MENU); | 474       break; | 
| 474         // When running the multi user mode on Chrome OS, windows can "visit" |  | 
| 475         // another user's desktop. |  | 
| 476         const std::string& user_id = |  | 
| 477             ash::Shell::GetInstance()->session_state_delegate()->GetUserID( |  | 
| 478                 IDC_VISIT_DESKTOP_OF_LRU_USER_2 == id ? 1 : 2); |  | 
| 479         chrome::MultiUserWindowManager::GetInstance()->ShowWindowForUser( |  | 
| 480             browser_->window()->GetNativeWindow(), |  | 
| 481             user_id); |  | 
| 482         break; |  | 
| 483       } |  | 
| 484 #endif | 475 #endif | 
| 485 | 476 | 
| 486 #if defined(OS_WIN) | 477 #if defined(OS_WIN) | 
| 487     // Windows 8 specific commands. | 478     // Windows 8 specific commands. | 
| 488     case IDC_METRO_SNAP_ENABLE: | 479     case IDC_METRO_SNAP_ENABLE: | 
| 489       browser_->SetMetroSnapMode(true); | 480       browser_->SetMetroSnapMode(true); | 
| 490       break; | 481       break; | 
| 491     case IDC_METRO_SNAP_DISABLE: | 482     case IDC_METRO_SNAP_DISABLE: | 
| 492       browser_->SetMetroSnapMode(false); | 483       browser_->SetMetroSnapMode(false); | 
| 493       break; | 484       break; | 
| (...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1349 | 1340 | 
| 1350 BrowserWindow* BrowserCommandController::window() { | 1341 BrowserWindow* BrowserCommandController::window() { | 
| 1351   return browser_->window(); | 1342   return browser_->window(); | 
| 1352 } | 1343 } | 
| 1353 | 1344 | 
| 1354 Profile* BrowserCommandController::profile() { | 1345 Profile* BrowserCommandController::profile() { | 
| 1355   return browser_->profile(); | 1346   return browser_->profile(); | 
| 1356 } | 1347 } | 
| 1357 | 1348 | 
| 1358 }  // namespace chrome | 1349 }  // namespace chrome | 
| OLD | NEW | 
|---|