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

Side by Side Diff: chrome/browser/background_mode_manager.cc

Issue 6312178: Highlight background pages in task manager if user clicks View Background Pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: Review feedback Created 9 years, 10 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
« no previous file with comments | « chrome/browser/app_controller_mac.mm ('k') | chrome/browser/ui/browser.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/app_controller_mac.mm ('k') | chrome/browser/ui/browser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698