OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 GetBrowserWindow()->OpenAboutChromeDialog(); | 325 GetBrowserWindow()->OpenAboutChromeDialog(); |
326 break; | 326 break; |
327 case IDC_EXIT: | 327 case IDC_EXIT: |
328 UserMetrics::RecordAction(UserMetricsAction("Exit"), profile_); | 328 UserMetrics::RecordAction(UserMetricsAction("Exit"), profile_); |
329 BrowserList::CloseAllBrowsersAndExit(); | 329 BrowserList::CloseAllBrowsersAndExit(); |
330 break; | 330 break; |
331 case IDC_OPTIONS: | 331 case IDC_OPTIONS: |
332 GetBrowserWindow()->OpenOptionsDialog(); | 332 GetBrowserWindow()->OpenOptionsDialog(); |
333 break; | 333 break; |
334 case IDC_TASK_MANAGER: | 334 case IDC_TASK_MANAGER: |
335 GetBrowserWindow()->OpenTaskManager(); | 335 GetBrowserWindow()->OpenTaskManager(true); |
336 break; | 336 break; |
337 default: | 337 default: |
338 ExecuteApplication(item); | 338 ExecuteApplication(item); |
339 break; | 339 break; |
340 } | 340 } |
341 } | 341 } |
342 | 342 |
343 Browser* BackgroundModeManager::GetBrowserWindow() { | 343 Browser* BackgroundModeManager::GetBrowserWindow() { |
344 Browser* browser = BrowserList::GetLastActive(); | 344 Browser* browser = BrowserList::GetLastActive(); |
345 if (!browser) { | 345 if (!browser) { |
(...skipping 12 matching lines...) Expand all Loading... |
358 // is always running on that platform, making it superfluous. | 358 // is always running on that platform, making it superfluous. |
359 #if defined(OS_CHROMEOS) | 359 #if defined(OS_CHROMEOS) |
360 return false; | 360 return false; |
361 #else | 361 #else |
362 bool background_mode_enabled = | 362 bool background_mode_enabled = |
363 !command_line->HasSwitch(switches::kDisableBackgroundMode) && | 363 !command_line->HasSwitch(switches::kDisableBackgroundMode) && |
364 !command_line->HasSwitch(switches::kDisableExtensions); | 364 !command_line->HasSwitch(switches::kDisableExtensions); |
365 return background_mode_enabled; | 365 return background_mode_enabled; |
366 #endif | 366 #endif |
367 } | 367 } |
OLD | NEW |