summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/app/chrome_command_ids.h1
-rw-r--r--chrome/app/generated_resources.grd6
-rw-r--r--chrome/browser/app_controller_mac.mm11
-rw-r--r--chrome/browser/background/background_mode_manager.cc2
-rw-r--r--chrome/browser/extensions/api/processes/processes_apitest.cc2
-rw-r--r--chrome/browser/prerender/prerender_browsertest.cc2
-rw-r--r--chrome/browser/resources/task_manager/main.js3
-rw-r--r--chrome/browser/resources/task_manager/task_manager.css7
-rw-r--r--chrome/browser/task_manager/task_manager.cc32
-rw-r--r--chrome/browser/task_manager/task_manager.h5
-rw-r--r--chrome/browser/task_manager/task_manager_browsertest.cc102
-rw-r--r--chrome/browser/task_manager/task_manager_notification_browsertest.cc2
-rw-r--r--chrome/browser/ui/ash/chrome_shell_delegate.cc2
-rw-r--r--chrome/browser/ui/browser_command_controller.cc9
-rw-r--r--chrome/browser/ui/browser_commands.cc4
-rw-r--r--chrome/browser/ui/browser_commands.h2
-rw-r--r--chrome/browser/ui/browser_dialogs.h5
-rw-r--r--chrome/browser/ui/cocoa/task_manager_mac.h19
-rw-r--r--chrome/browser/ui/cocoa/task_manager_mac.mm79
-rw-r--r--chrome/browser/ui/cocoa/task_manager_mac_unittest.mm6
-rw-r--r--chrome/browser/ui/gtk/task_manager_gtk.cc37
-rw-r--r--chrome/browser/ui/gtk/task_manager_gtk.h11
-rw-r--r--chrome/browser/ui/toolbar/wrench_menu_model.cc19
-rw-r--r--chrome/browser/ui/views/task_manager_view.cc74
-rw-r--r--chrome/browser/ui/webui/task_manager/task_manager_handler.cc4
-rw-r--r--chrome/common/extensions/docs/templates/articles/event_pages.html3
26 files changed, 55 insertions, 394 deletions
diff --git a/chrome/app/chrome_command_ids.h b/chrome/app/chrome_command_ids.h
index ec6725c..6f7e563 100644
--- a/chrome/app/chrome_command_ids.h
+++ b/chrome/app/chrome_command_ids.h
@@ -179,7 +179,6 @@
#define IDC_DEV_TOOLS_INSPECT 40023
#define IDC_UPGRADE_DIALOG 40024
#define IDC_VIEW_INCOMPATIBILITIES 40025
-#define IDC_VIEW_BACKGROUND_PAGES 40026
#define IDC_SHOW_KEYBOARD_OVERLAY 40027
#define IDC_PROFILING_ENABLED 40028
#define IDC_BOOKMARKS_MENU 40029
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index fd49958..2432a24 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -1458,9 +1458,6 @@ Psst! Incognito mode <ph name="SHORTCUT_KEY">$1<ex>(Ctrl+Shift+N)</ex></ph> may
<message name="IDS_VIEW_INCOMPATIBILITIES" desc="The text label of the View incompatibilities menu item">
Software incompatibility: Learn more
</message>
- <message name="IDS_VIEW_BACKGROUND_PAGES" desc="The text label of the View background pages menu item">
- View background pages (<ph name="NUM_BACKGROUND_APPS">$1<ex>3</ex></ph>)
- </message>
<message name="IDS_EXIT" desc="The text label of the Exit menu item">
E&amp;xit
</message>
@@ -1499,9 +1496,6 @@ Psst! Incognito mode <ph name="SHORTCUT_KEY">$1<ex>(Ctrl+Shift+N)</ex></ph> may
<message name="IDS_VIEW_INCOMPATIBILITIES" desc="The text label of the View incompatibilities menu item">
Software Incompatibility: Learn More
</message>
- <message name="IDS_VIEW_BACKGROUND_PAGES" desc="The text label of the View background pages menu item">
- View Background Pages (<ph name="NUM_BACKGROUND_APPS">$1<ex>3</ex></ph>)
- </message>
<message name="IDS_EXIT" desc="In Title Case: The text label of the Exit menu item">
E&amp;xit
</message>
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index 4aae313..9ceb463 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -928,7 +928,7 @@ void RecordLastRunAppBundlePath() {
break;
case IDC_TASK_MANAGER:
content::RecordAction(UserMetricsAction("TaskManager"));
- TaskManagerMac::Show(false);
+ TaskManagerMac::Show();
break;
case IDC_OPTIONS:
[self showPreferences:sender];
@@ -1271,15 +1271,6 @@ void RecordLastRunAppBundlePath() {
[appItem setTag:position];
[appMenu addItem:appItem];
}
-
- scoped_nsobject<NSMenuItem> appMenuItem([[NSMenuItem alloc]
- initWithTitle:menuStr
- action:@selector(executeApplication:)
- keyEquivalent:@""]);
- [appMenuItem setTarget:self];
- [appMenuItem setTag:IDC_VIEW_BACKGROUND_PAGES];
- [appMenuItem setSubmenu:appMenu];
- [dockMenu addItem:appMenuItem];
}
}
diff --git a/chrome/browser/background/background_mode_manager.cc b/chrome/browser/background/background_mode_manager.cc
index e6a0b96..1e54e65 100644
--- a/chrome/browser/background/background_mode_manager.cc
+++ b/chrome/browser/background/background_mode_manager.cc
@@ -487,7 +487,7 @@ void BackgroundModeManager::ExecuteCommand(int command_id, int event_flags) {
chrome::ShowAboutChrome(bmd->GetBrowserWindow());
break;
case IDC_TASK_MANAGER:
- chrome::OpenTaskManager(bmd->GetBrowserWindow(), true);
+ chrome::OpenTaskManager(bmd->GetBrowserWindow());
break;
case IDC_EXIT:
content::RecordAction(UserMetricsAction("Exit"));
diff --git a/chrome/browser/extensions/api/processes/processes_apitest.cc b/chrome/browser/extensions/api/processes/processes_apitest.cc
index af7c08b..d38a683 100644
--- a/chrome/browser/extensions/api/processes/processes_apitest.cc
+++ b/chrome/browser/extensions/api/processes/processes_apitest.cc
@@ -50,7 +50,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ProcessesVsTaskManager) {
EXPECT_EQ(TaskManagerModel::TASK_PENDING, model->update_state_);
// Now show the task manager and wait for it to be ready
- chrome::ShowTaskManager(browser(), false);
+ chrome::ShowTaskManager(browser());
EXPECT_EQ(2, model->update_requests_);
EXPECT_EQ(TaskManagerModel::TASK_PENDING, model->update_state_);
diff --git a/chrome/browser/prerender/prerender_browsertest.cc b/chrome/browser/prerender/prerender_browsertest.cc
index a91f33f..8521d35 100644
--- a/chrome/browser/prerender/prerender_browsertest.cc
+++ b/chrome/browser/prerender/prerender_browsertest.cc
@@ -1884,7 +1884,7 @@ IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest,
// See crbug.com/131836.
IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, DISABLED_PrerenderTaskManager) {
// Show the task manager. This populates the model.
- chrome::OpenTaskManager(current_browser(), false);
+ chrome::OpenTaskManager(current_browser());
// Wait for the model of task manager to start.
TaskManagerBrowserTestUtil::WaitForWebResourceChange(1);
diff --git a/chrome/browser/resources/task_manager/main.js b/chrome/browser/resources/task_manager/main.js
index 154d399..6a6a046 100644
--- a/chrome/browser/resources/task_manager/main.js
+++ b/chrome/browser/resources/task_manager/main.js
@@ -429,8 +429,6 @@ TaskManager.prototype = {
var listItem = new cr.ui.ListItem({label: ''});
listItem.className = 'table-row';
- if (this.opt_.isBackgroundMode && data.isBackgroundResource)
- listItem.className += ' table-background-row';
for (var i = 0; i < cm.size; i++) {
var cell = document.createElement('div');
@@ -690,7 +688,6 @@ taskmanager = TaskManager.getInstance();
function init() {
var params = parseQueryParams(window.location);
var opt = {};
- opt['isBackgroundMode'] = params.background;
opt['isShowCloseButton'] = params.showclose;
taskmanager.initialize(document.body, opt);
}
diff --git a/chrome/browser/resources/task_manager/task_manager.css b/chrome/browser/resources/task_manager/task_manager.css
index e050d56..e77055f 100644
--- a/chrome/browser/resources/task_manager/task_manager.css
+++ b/chrome/browser/resources/task_manager/task_manager.css
@@ -77,13 +77,6 @@ body {
width: 6px;
}
-.table-background-row {
- background-color: hsl(34, 91%, 87%);
- background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.8),
- rgba(255, 255, 255, 0));
- border-color: hsl(34, 91%, 65%);
-}
-
/* Cells in table. */
.table-row-cell {
-webkit-box-orient: horizontal;
diff --git a/chrome/browser/task_manager/task_manager.cc b/chrome/browser/task_manager/task_manager.cc
index f0e3408..be9a3b9 100644
--- a/chrome/browser/task_manager/task_manager.cc
+++ b/chrome/browser/task_manager/task_manager.cc
@@ -15,8 +15,6 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
-#include "chrome/browser/background/background_contents_service.h"
-#include "chrome/browser/background/background_contents_service_factory.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/extension_process_manager.h"
#include "chrome/browser/extensions/extension_system.h"
@@ -1545,36 +1543,6 @@ void TaskManager::OpenAboutMemory(chrome::HostDesktopType desktop_type) {
chrome::Navigate(&params);
}
-// static
-int TaskManager::GetBackgroundPageCount() {
- int count = 0;
- ProfileManager* profile_manager = g_browser_process->profile_manager();
- if (!profile_manager) // Null when running unit tests.
- return count;
- std::vector<Profile*> profiles(profile_manager->GetLoadedProfiles());
- for (std::vector<Profile*>::const_iterator iter = profiles.begin();
- iter != profiles.end();
- ++iter) {
- Profile* profile = *iter;
- // Count the number of Background Contents (background pages for hosted
- // apps). Incognito windows do not support hosted apps, so just check the
- // main profile.
- BackgroundContentsService* background_contents_service =
- BackgroundContentsServiceFactory::GetForProfile(profile);
- if (background_contents_service)
- count += background_contents_service->GetBackgroundContents().size();
-
- // Count the number of extensions with background pages (including
- // incognito).
- count += CountExtensionBackgroundPagesForProfile(profile);
- if (profile->HasOffTheRecordProfile()) {
- count += CountExtensionBackgroundPagesForProfile(
- profile->GetOffTheRecordProfile());
- }
- }
- return count;
-}
-
TaskManager::TaskManager()
: model_(new TaskManagerModel(this)) {
}
diff --git a/chrome/browser/task_manager/task_manager.h b/chrome/browser/task_manager/task_manager.h
index 31ea9a8..062cf3a 100644
--- a/chrome/browser/task_manager/task_manager.h
+++ b/chrome/browser/task_manager/task_manager.h
@@ -83,11 +83,6 @@ class TaskManager {
void OpenAboutMemory(chrome::HostDesktopType desktop_type);
- // Returns the number of background pages that will be displayed in the
- // TaskManager. Used by the wrench menu code to display a count of background
- // pages in the "View Background Pages" menu item.
- static int GetBackgroundPageCount();
-
private:
FRIEND_TEST_ALL_PREFIXES(TaskManagerTest, Basic);
FRIEND_TEST_ALL_PREFIXES(TaskManagerTest, Resources);
diff --git a/chrome/browser/task_manager/task_manager_browsertest.cc b/chrome/browser/task_manager/task_manager_browsertest.cc
index 73584ca..81a2a1a 100644
--- a/chrome/browser/task_manager/task_manager_browsertest.cc
+++ b/chrome/browser/task_manager/task_manager_browsertest.cc
@@ -7,8 +7,6 @@
#include "base/files/file_path.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
-#include "chrome/browser/background/background_contents_service.h"
-#include "chrome/browser/background/background_contents_service_factory.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/extension_browsertest.h"
#include "chrome/browser/extensions/extension_service.h"
@@ -78,11 +76,9 @@ class TaskManagerBrowserTest : public ExtensionBrowserTest {
EXPECT_EQ(0, model()->ResourceCount());
- EXPECT_EQ(0, TaskManager::GetBackgroundPageCount());
-
// Show the task manager. This populates the model, and helps with debugging
// (you see the task manager).
- chrome::ShowTaskManager(browser(), false);
+ chrome::ShowTaskManager(browser());
// New Tab Page.
TaskManagerBrowserTestUtil::WaitForWebResourceChange(1);
@@ -189,67 +185,6 @@ IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, MAYBE_NoticePanelChanges) {
TaskManagerBrowserTestUtil::WaitForWebResourceChange(1);
}
-IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, NoticeBGContentsChanges) {
- // Open a new background contents and make sure we notice that.
- GURL url(ui_test_utils::GetTestUrl(base::FilePath(
- base::FilePath::kCurrentDirectory), base::FilePath(kTitle1File)));
-
- BackgroundContentsService* service =
- BackgroundContentsServiceFactory::GetForProfile(browser()->profile());
- string16 application_id(ASCIIToUTF16("test_app_id"));
- service->LoadBackgroundContents(browser()->profile(),
- url,
- ASCIIToUTF16("background_page"),
- application_id);
- TaskManagerBrowserTestUtil::WaitForWebResourceChange(2);
- EXPECT_EQ(1, TaskManager::GetBackgroundPageCount());
-
- // Close the background contents and verify that we notice.
- service->ShutdownAssociatedBackgroundContents(application_id);
- TaskManagerBrowserTestUtil::WaitForWebResourceChange(1);
- EXPECT_EQ(0, TaskManager::GetBackgroundPageCount());
-}
-
-IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, KillBGContents) {
- int resource_count = TaskManager::GetInstance()->model()->ResourceCount();
-
- // Open a new background contents and make sure we notice that.
- GURL url(ui_test_utils::GetTestUrl(base::FilePath(
- base::FilePath::kCurrentDirectory), base::FilePath(kTitle1File)));
-
- content::WindowedNotificationObserver observer(
- chrome::NOTIFICATION_BACKGROUND_CONTENTS_NAVIGATED,
- content::Source<Profile>(browser()->profile()));
-
- BackgroundContentsService* service =
- BackgroundContentsServiceFactory::GetForProfile(browser()->profile());
- string16 application_id(ASCIIToUTF16("test_app_id"));
- service->LoadBackgroundContents(browser()->profile(),
- url,
- ASCIIToUTF16("background_page"),
- application_id);
-
- // Wait for the background contents process to finish loading.
- observer.Wait();
-
- EXPECT_EQ(resource_count + 1, model()->ResourceCount());
- EXPECT_EQ(1, TaskManager::GetBackgroundPageCount());
-
- // Kill the background contents process and verify that it disappears from the
- // model.
- bool found = false;
- for (int i = 0; i < model()->ResourceCount(); ++i) {
- if (model()->IsBackgroundResource(i)) {
- TaskManager::GetInstance()->KillProcess(i);
- found = true;
- break;
- }
- }
- ASSERT_TRUE(found);
- TaskManagerBrowserTestUtil::WaitForWebResourceChange(1);
- EXPECT_EQ(0, TaskManager::GetBackgroundPageCount());
-}
-
#if defined(USE_ASH) || defined(OS_WIN)
// This test fails on Ash because task manager treats view type
// Panels differently for Ash.
@@ -288,20 +223,6 @@ IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, MAYBE_KillPanelExtension) {
TaskManagerBrowserTestUtil::WaitForWebResourceChange(1);
}
-IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, NoticeExtensionChanges) {
- // Loading an extension with a background page should result in a new
- // resource being created for it.
- ASSERT_TRUE(LoadExtension(
- test_data_dir_.AppendASCII("common").AppendASCII("background_page")));
- TaskManagerBrowserTestUtil::WaitForWebResourceChange(2);
- EXPECT_EQ(1, TaskManager::GetBackgroundPageCount());
-
- // Unload extension to avoid crash on Windows (see http://crbug.com/31663).
- UnloadExtension(last_loaded_extension_id_);
- TaskManagerBrowserTestUtil::WaitForWebResourceChange(1);
- EXPECT_EQ(0, TaskManager::GetBackgroundPageCount());
-}
-
IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, NoticeExtensionTabs) {
int resource_count = TaskManager::GetInstance()->model()->ResourceCount();
ASSERT_TRUE(LoadExtension(
@@ -436,27 +357,6 @@ IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, NoticeHostedAppTabs) {
tab_prefix, true));
}
-IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, MAYBE_KillExtension) {
- int resource_count = TaskManager::GetInstance()->model()->ResourceCount();
-
- ASSERT_TRUE(LoadExtension(
- test_data_dir_.AppendASCII("common").AppendASCII("background_page")));
-
- // Wait until we see the loaded extension in the task manager (the three
- // resources are: the browser process, New Tab Page, and the extension).
- TaskManagerBrowserTestUtil::WaitForWebResourceChange(2);
- EXPECT_EQ(1, TaskManager::GetBackgroundPageCount());
-
- EXPECT_TRUE(model()->GetResourceExtension(0) == NULL);
- EXPECT_TRUE(model()->GetResourceExtension(1) == NULL);
- ASSERT_TRUE(model()->GetResourceExtension(resource_count) != NULL);
-
- // Kill the extension process and make sure we notice it.
- TaskManager::GetInstance()->KillProcess(resource_count);
- TaskManagerBrowserTestUtil::WaitForWebResourceChange(1);
- EXPECT_EQ(0, TaskManager::GetBackgroundPageCount());
-}
-
// Disabled, http://crbug.com/66957.
IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest,
DISABLED_KillExtensionAndReload) {
diff --git a/chrome/browser/task_manager/task_manager_notification_browsertest.cc b/chrome/browser/task_manager/task_manager_notification_browsertest.cc
index 2dcacf3..76ad825 100644
--- a/chrome/browser/task_manager/task_manager_notification_browsertest.cc
+++ b/chrome/browser/task_manager/task_manager_notification_browsertest.cc
@@ -53,7 +53,7 @@ IN_PROC_BROWSER_TEST_F(TaskManagerNotificationBrowserTest,
EXPECT_EQ(0, model()->ResourceCount());
// Show the task manager.
- chrome::ShowTaskManager(browser(), false);
+ chrome::ShowTaskManager(browser());
// Expect to see the browser and the New Tab Page renderer.
TaskManagerBrowserTestUtil::WaitForWebResourceChange(1);
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate.cc b/chrome/browser/ui/ash/chrome_shell_delegate.cc
index 168ae3a..a0a3f3d 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate.cc
+++ b/chrome/browser/ui/ash/chrome_shell_delegate.cc
@@ -238,7 +238,7 @@ void ChromeShellDelegate::RestoreTab() {
}
void ChromeShellDelegate::ShowTaskManager() {
- chrome::OpenTaskManager(NULL, false);
+ chrome::OpenTaskManager(NULL);
}
content::BrowserContext* ChromeShellDelegate::GetCurrentBrowserContext() {
diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui/browser_command_controller.cc
index b7bd0f8..b38cf57 100644
--- a/chrome/browser/ui/browser_command_controller.cc
+++ b/chrome/browser/ui/browser_command_controller.cc
@@ -627,10 +627,7 @@ void BrowserCommandController::ExecuteCommandWithDisposition(
ToggleDevToolsWindow(browser_, DEVTOOLS_TOGGLE_ACTION_TOGGLE);
break;
case IDC_TASK_MANAGER:
- OpenTaskManager(browser_, false);
- break;
- case IDC_VIEW_BACKGROUND_PAGES:
- OpenTaskManager(browser_, true);
+ OpenTaskManager(browser_);
break;
case IDC_FEEDBACK:
OpenFeedbackDialog(browser_);
@@ -941,10 +938,6 @@ void BrowserCommandController::InitCommandState() {
command_updater_.UpdateCommandEnabled(IDC_UPGRADE_DIALOG, true);
command_updater_.UpdateCommandEnabled(IDC_VIEW_INCOMPATIBILITIES, true);
- // View Background Pages entry is always enabled, but is hidden if there are
- // no background pages.
- command_updater_.UpdateCommandEnabled(IDC_VIEW_BACKGROUND_PAGES, true);
-
// Toggle speech input
command_updater_.UpdateCommandEnabled(IDC_TOGGLE_SPEECH_INPUT, true);
diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc
index 51c6169..eeedd61 100644
--- a/chrome/browser/ui/browser_commands.cc
+++ b/chrome/browser/ui/browser_commands.cc
@@ -892,9 +892,9 @@ bool CanOpenTaskManager() {
#endif
}
-void OpenTaskManager(Browser* browser, bool highlight_background_resources) {
+void OpenTaskManager(Browser* browser) {
content::RecordAction(UserMetricsAction("TaskManager"));
- chrome::ShowTaskManager(browser, highlight_background_resources);
+ chrome::ShowTaskManager(browser);
}
void OpenFeedbackDialog(Browser* browser) {
diff --git a/chrome/browser/ui/browser_commands.h b/chrome/browser/ui/browser_commands.h
index f144d8c7..b64b212 100644
--- a/chrome/browser/ui/browser_commands.h
+++ b/chrome/browser/ui/browser_commands.h
@@ -132,7 +132,7 @@ void FocusNextPane(Browser* browser);
void FocusPreviousPane(Browser* browser);
void ToggleDevToolsWindow(Browser* browser, DevToolsToggleAction action);
bool CanOpenTaskManager();
-void OpenTaskManager(Browser* browser, bool highlight_background_resources);
+void OpenTaskManager(Browser* browser);
void OpenFeedbackDialog(Browser* browser);
void ToggleBookmarkBar(Browser* browser);
void ShowAppMenu(Browser* browser);
diff --git a/chrome/browser/ui/browser_dialogs.h b/chrome/browser/ui/browser_dialogs.h
index 8ee472e..c3ad400 100644
--- a/chrome/browser/ui/browser_dialogs.h
+++ b/chrome/browser/ui/browser_dialogs.h
@@ -68,9 +68,8 @@ void ShowExtensionInstalledBubble(const extensions::Extension* extension,
void ShowHungRendererDialog(content::WebContents* contents);
void HideHungRendererDialog(content::WebContents* contents);
-// Shows the Task Manager. If |highlight_background_resources| is set, the
-// backgroundpages will be shown. |browser| can be NULL when called from ASH.
-void ShowTaskManager(Browser* browser, bool highlight_background_resources);
+// Shows the Task Manager. |browser| can be NULL when called from Ash.
+void ShowTaskManager(Browser* browser);
#if !defined(OS_MACOSX)
// Shows the create web app shortcut dialog box.
diff --git a/chrome/browser/ui/cocoa/task_manager_mac.h b/chrome/browser/ui/cocoa/task_manager_mac.h
index 7651e0d..6e804b9 100644
--- a/chrome/browser/ui/cocoa/task_manager_mac.h
+++ b/chrome/browser/ui/cocoa/task_manager_mac.h
@@ -30,7 +30,6 @@ class ImageSkia;
TaskManagerMac* taskManagerObserver_; // weak
TaskManager* taskManager_; // weak
TaskManagerModel* model_; // weak
- bool highlightBackgroundResources_;
scoped_nsobject<WindowSizeAutosaver> size_saver_;
@@ -41,14 +40,10 @@ class ImageSkia;
// Descriptor of the current sort column.
scoped_nsobject<NSSortDescriptor> currentSortDescriptor_;
-
- // Color we use for background resources.
- scoped_nsobject<NSColor> backgroundResourceColor_;
}
// Creates and shows the task manager's window.
-- (id)initWithTaskManagerObserver:(TaskManagerMac*)taskManagerObserver
- highlightBackgroundResources:(bool)highlightBackgroundResources;
+- (id)initWithTaskManagerObserver:(TaskManagerMac*)taskManagerObserver;
// Refreshes all data in the task manager table.
- (void)reloadData;
@@ -71,7 +66,7 @@ class ImageSkia;
class TaskManagerMac : public TaskManagerModelObserver,
public TableRowNSImageCache::Table {
public:
- TaskManagerMac(TaskManager* task_manager, bool highlight_background);
+ explicit TaskManagerMac(TaskManager* task_manager);
virtual ~TaskManagerMac();
// TaskManagerModelObserver
@@ -89,9 +84,8 @@ class TaskManagerMac : public TaskManagerModelObserver,
virtual gfx::ImageSkia GetIcon(int r) const OVERRIDE;
// Creates the task manager if it doesn't exist; otherwise, it activates the
- // existing task manager window. Highlights background resources if
- // |highlight_background_resources| is true.
- static void Show(bool highlight_background_resources);
+ // existing task manager window.
+ static void Show();
// Returns the TaskManager observed by |this|.
TaskManager* task_manager() { return task_manager_; }
@@ -102,8 +96,6 @@ class TaskManagerMac : public TaskManagerModelObserver,
// Returns the cocoa object. Used for testing.
TaskManagerWindowController* cocoa_controller() { return window_controller_; }
- // Returns true if the resource at this location is a background resource.
- bool IsBackgroundRow(int row) const;
private:
// The task manager.
TaskManager* const task_manager_; // weak
@@ -118,9 +110,6 @@ class TaskManagerMac : public TaskManagerModelObserver,
// Caches favicons for all rows. Needs to be initalized after |model_|.
TableRowNSImageCache icon_cache_;
- // If true, highlight background resources.
- bool highlight_background_resources_;
-
// An open task manager window. There can only be one open at a time. This
// is reset to NULL when the window is closed.
static TaskManagerMac* instance_;
diff --git a/chrome/browser/ui/cocoa/task_manager_mac.mm b/chrome/browser/ui/cocoa/task_manager_mac.mm
index bf8e04d..62fe460 100644
--- a/chrome/browser/ui/cocoa/task_manager_mac.mm
+++ b/chrome/browser/ui/cocoa/task_manager_mac.mm
@@ -113,8 +113,7 @@ class SortHelper {
@implementation TaskManagerWindowController
-- (id)initWithTaskManagerObserver:(TaskManagerMac*)taskManagerObserver
- highlightBackgroundResources:(bool)highlightBackgroundResources {
+- (id)initWithTaskManagerObserver:(TaskManagerMac*)taskManagerObserver {
NSString* nibpath = [base::mac::FrameworkBundle()
pathForResource:@"TaskManager"
ofType:@"nib"];
@@ -122,15 +121,6 @@ class SortHelper {
taskManagerObserver_ = taskManagerObserver;
taskManager_ = taskManagerObserver_->task_manager();
model_ = taskManager_->model();
- highlightBackgroundResources_ = highlightBackgroundResources;
- if (highlightBackgroundResources_) {
- // Highlight background resources with a yellow background.
- backgroundResourceColor_.reset(
- [[NSColor colorWithDeviceRed:0xff/255.0
- green:0xfa/255.0
- blue:0xcd/255.0
- alpha:1.0] retain]);
- }
if (g_browser_process && g_browser_process->local_state()) {
size_saver_.reset([[WindowSizeAutosaver alloc]
@@ -396,35 +386,6 @@ class SortHelper {
[self autorelease];
}
-// Delegate method invoked before each cell in the table is displayed. We
-// override this to provide highlighting of background resources.
-- (void) tableView:(NSTableView*)tableView
- willDisplayCell:(id)cell
- forTableColumn:(NSTableColumn*)tableColumn
- row:(NSInteger)row {
- if (!highlightBackgroundResources_)
- return;
-
- DCHECK([cell respondsToSelector:@selector(setBackgroundColor:)]);
- if ([cell respondsToSelector:@selector(setBackgroundColor:)]) {
- NSColor* color = nil;
- if (taskManagerObserver_->IsBackgroundRow(viewToModelMap_[row]) &&
- ![tableView isRowSelected:row]) {
- color = backgroundResourceColor_.get();
- if ((row % 2) == 1 && [tableView usesAlternatingRowBackgroundColors]) {
- color = [color blendedColorWithFraction:0.05
- ofColor:[NSColor blackColor]];
- }
- }
- [cell setBackgroundColor:color];
-
- // The icon at the left is an |NSButtonCell|, which does not
- // implement this method on 10.5.
- if ([cell respondsToSelector:@selector(setDrawsBackground:)])
- [cell setDrawsBackground:(color != nil)];
- }
-}
-
@end
@implementation TaskManagerWindowController (NSTableDataSource)
@@ -489,16 +450,12 @@ class SortHelper {
////////////////////////////////////////////////////////////////////////////////
// TaskManagerMac implementation:
-TaskManagerMac::TaskManagerMac(TaskManager* task_manager,
- bool highlight_background_resources)
+TaskManagerMac::TaskManagerMac(TaskManager* task_manager)
: task_manager_(task_manager),
model_(task_manager->model()),
- icon_cache_(this),
- highlight_background_resources_(highlight_background_resources) {
+ icon_cache_(this) {
window_controller_ =
- [[TaskManagerWindowController alloc]
- initWithTaskManagerObserver:this
- highlightBackgroundResources:highlight_background_resources];
+ [[TaskManagerWindowController alloc] initWithTaskManagerObserver:this];
model_->AddObserver(this);
}
@@ -560,37 +517,23 @@ gfx::ImageSkia TaskManagerMac::GetIcon(int r) const {
return model_->GetResourceIcon(r);
}
-bool TaskManagerMac::IsBackgroundRow(int row) const {
- return model_->IsBackgroundResource(row);
-}
-
// static
-void TaskManagerMac::Show(bool highlight_background_resources) {
+void TaskManagerMac::Show() {
if (instance_) {
- if (instance_->highlight_background_resources_ ==
- highlight_background_resources) {
- // There's a Task manager window open already, so just activate it.
- [[instance_->window_controller_ window]
- makeKeyAndOrderFront:instance_->window_controller_];
- return;
- } else {
- // The user is switching between "View Background Pages" and
- // "Task Manager" so close the existing window and fall through to
- // open a new one.
- [[instance_->window_controller_ window] close];
- }
+ [[instance_->window_controller_ window]
+ makeKeyAndOrderFront:instance_->window_controller_];
+ return;
}
// Create a new instance.
- instance_ = new TaskManagerMac(TaskManager::GetInstance(),
- highlight_background_resources);
+ instance_ = new TaskManagerMac(TaskManager::GetInstance());
instance_->model_->StartUpdating();
}
namespace chrome {
// Declared in browser_dialogs.h.
-void ShowTaskManager(Browser* browser, bool highlight_background_resources) {
- TaskManagerMac::Show(highlight_background_resources);
+void ShowTaskManager(Browser* browser) {
+ TaskManagerMac::Show();
}
} // namespace chrome
diff --git a/chrome/browser/ui/cocoa/task_manager_mac_unittest.mm b/chrome/browser/ui/cocoa/task_manager_mac_unittest.mm
index 6a548e4..b849012 100644
--- a/chrome/browser/ui/cocoa/task_manager_mac_unittest.mm
+++ b/chrome/browser/ui/cocoa/task_manager_mac_unittest.mm
@@ -47,7 +47,7 @@ class TaskManagerWindowControllerTest : public CocoaTest {
// Test creation, to ensure nothing leaks or crashes.
TEST_F(TaskManagerWindowControllerTest, Init) {
TaskManager task_manager;
- TaskManagerMac* bridge(new TaskManagerMac(&task_manager, false));
+ TaskManagerMac* bridge(new TaskManagerMac(&task_manager));
TaskManagerWindowController* controller = bridge->cocoa_controller();
// Releases the controller, which in turn deletes |bridge|.
@@ -65,7 +65,7 @@ TEST_F(TaskManagerWindowControllerTest, Sort) {
task_manager.AddResource(&resource2);
task_manager.AddResource(&resource3); // Will be in the same group as 2.
- TaskManagerMac* bridge(new TaskManagerMac(&task_manager, false));
+ TaskManagerMac* bridge(new TaskManagerMac(&task_manager));
TaskManagerWindowController* controller = bridge->cocoa_controller();
NSTableView* table = [controller tableView];
ASSERT_EQ(3, [controller numberOfRowsInTableView:table]);
@@ -98,7 +98,7 @@ TEST_F(TaskManagerWindowControllerTest, SelectionAdaptsToSorting) {
task_manager.AddResource(&resource1);
task_manager.AddResource(&resource2);
- TaskManagerMac* bridge(new TaskManagerMac(&task_manager, false));
+ TaskManagerMac* bridge(new TaskManagerMac(&task_manager));
TaskManagerWindowController* controller = bridge->cocoa_controller();
NSTableView* table = [controller tableView];
ASSERT_EQ(2, [controller numberOfRowsInTableView:table]);
diff --git a/chrome/browser/ui/gtk/task_manager_gtk.cc b/chrome/browser/ui/gtk/task_manager_gtk.cc
index c765e3e..32cb85c 100644
--- a/chrome/browser/ui/gtk/task_manager_gtk.cc
+++ b/chrome/browser/ui/gtk/task_manager_gtk.cc
@@ -71,16 +71,12 @@ enum TaskManagerColumn {
kTaskManagerFPS,
kTaskManagerSqliteMemoryUsed,
kTaskManagerGoatsTeleported,
- // Columns below this point are not visible in the task manager.
- kTaskManagerBackgroundColor,
kTaskManagerColumnCount,
};
const TaskManagerColumn kTaskManagerLastVisibleColumn =
kTaskManagerGoatsTeleported;
-static const GdkColor kHighlightColor = GDK_COLOR_RGB(0xff, 0xfa, 0xcd);
-
TaskManagerColumn TaskManagerResourceIDToColumnID(int id) {
switch (id) {
case IDS_TASK_MANAGER_TASK_COLUMN:
@@ -194,15 +190,9 @@ void TreeViewInsertTaskColumn(GtkWidget* treeview, int resid) {
gtk_tree_view_column_pack_start(column, image_renderer, FALSE);
gtk_tree_view_column_add_attribute(column, image_renderer,
"pixbuf", kTaskManagerIcon);
- gtk_tree_view_column_add_attribute(column, image_renderer,
- "cell-background-gdk",
- kTaskManagerBackgroundColor);
GtkCellRenderer* text_renderer = gtk_cell_renderer_text_new();
gtk_tree_view_column_pack_start(column, text_renderer, TRUE);
gtk_tree_view_column_add_attribute(column, text_renderer, "markup", colid);
- gtk_tree_view_column_add_attribute(column, text_renderer,
- "cell-background-gdk",
- kTaskManagerBackgroundColor);
gtk_tree_view_column_set_resizable(column, TRUE);
// This is temporary: we'll turn expanding off after getting the size.
gtk_tree_view_column_set_expand(column, TRUE);
@@ -218,7 +208,6 @@ void TreeViewInsertColumnWithName(GtkWidget* treeview,
GTK_TREE_VIEW(treeview), -1,
name, renderer,
"text", colid,
- "cell-background-gdk", kTaskManagerBackgroundColor,
NULL);
GtkTreeViewColumn* column = gtk_tree_view_get_column(
GTK_TREE_VIEW(treeview), TreeViewColumnIndexFromID(colid));
@@ -315,15 +304,14 @@ class TaskManagerGtk::ContextMenuController
DISALLOW_COPY_AND_ASSIGN(ContextMenuController);
};
-TaskManagerGtk::TaskManagerGtk(bool highlight_background_resources)
+TaskManagerGtk::TaskManagerGtk()
: task_manager_(TaskManager::GetInstance()),
model_(TaskManager::GetInstance()->model()),
dialog_(NULL),
treeview_(NULL),
process_list_(NULL),
process_count_(0),
- ignore_selection_changed_(false),
- highlight_background_resources_(highlight_background_resources) {
+ ignore_selection_changed_(false) {
Init();
}
@@ -427,19 +415,12 @@ void TaskManagerGtk::Close() {
}
// static
-void TaskManagerGtk::Show(bool highlight_background_resources) {
- if (instance_ &&
- instance_->highlight_background_resources_ !=
- highlight_background_resources) {
- instance_->Close();
- DCHECK(!instance_);
- }
-
+void TaskManagerGtk::Show() {
if (instance_) {
// If there's a Task manager window open already, just activate it.
gtk_util::PresentWindow(instance_->dialog_, 0);
} else {
- instance_ = new TaskManagerGtk(highlight_background_resources);
+ instance_ = new TaskManagerGtk();
instance_->model_->StartUpdating();
}
}
@@ -584,7 +565,7 @@ void TaskManagerGtk::CreateTaskManagerTreeview() {
GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
- G_TYPE_STRING, G_TYPE_STRING, GDK_TYPE_COLOR);
+ G_TYPE_STRING, G_TYPE_STRING);
// Support sorting on all columns.
process_list_sort_ = gtk_tree_model_sort_new_with_model(
@@ -736,8 +717,6 @@ void TaskManagerGtk::SetRowDataFromModel(int row, GtkTreeIter* iter) {
std::string goats =
GetModelText(row, IDS_TASK_MANAGER_GOATS_TELEPORTED_COLUMN);
- bool is_background = model_->IsBackgroundResource(row) &&
- highlight_background_resources_;
gtk_list_store_set(process_list_, iter,
kTaskManagerIcon, icon,
kTaskManagerTask, task_markup,
@@ -755,8 +734,6 @@ void TaskManagerGtk::SetRowDataFromModel(int row, GtkTreeIter* iter) {
kTaskManagerFPS, fps.c_str(),
kTaskManagerSqliteMemoryUsed, sqlite_memory.c_str(),
kTaskManagerGoatsTeleported, goats.c_str(),
- kTaskManagerBackgroundColor,
- is_background ? &kHighlightColor : NULL,
-1);
g_object_unref(icon);
g_free(task_markup);
@@ -969,8 +946,8 @@ gboolean TaskManagerGtk::OnGtkAccelerator(GtkAccelGroup* accel_group,
namespace chrome {
// Declared in browser_dialogs.h.
-void ShowTaskManager(Browser* browser, bool highlight_background_resources) {
- TaskManagerGtk::Show(highlight_background_resources);
+void ShowTaskManager(Browser* browser) {
+ TaskManagerGtk::Show();
}
} // namespace chrome
diff --git a/chrome/browser/ui/gtk/task_manager_gtk.h b/chrome/browser/ui/gtk/task_manager_gtk.h
index 7df063d..cce76f9 100644
--- a/chrome/browser/ui/gtk/task_manager_gtk.h
+++ b/chrome/browser/ui/gtk/task_manager_gtk.h
@@ -21,7 +21,7 @@ class Point;
class TaskManagerGtk : public TaskManagerModelObserver {
public:
- explicit TaskManagerGtk(bool highlight_background_resources);
+ TaskManagerGtk();
virtual ~TaskManagerGtk();
// TaskManagerModelObserver
@@ -34,10 +34,8 @@ class TaskManagerGtk : public TaskManagerModelObserver {
void Close();
// Creates the task manager if it doesn't exist; otherwise, it activates the
- // existing task manager window. If |highlight_background_resources| is true,
- // background resources are rendered with a yellow highlight (for the
- // "View Background Pages" menu item).
- static void Show(bool highlight_background_resources);
+ // existing task manager window.
+ static void Show();
private:
class ContextMenuController;
@@ -249,9 +247,6 @@ class TaskManagerGtk : public TaskManagerModelObserver {
// ourselves caused.
bool ignore_selection_changed_;
- // If true, background resources are rendered with a yellow highlight.
- bool highlight_background_resources_;
-
DISALLOW_COPY_AND_ASSIGN(TaskManagerGtk);
};
diff --git a/chrome/browser/ui/toolbar/wrench_menu_model.cc b/chrome/browser/ui/toolbar/wrench_menu_model.cc
index f742d75..34941e4 100644
--- a/chrome/browser/ui/toolbar/wrench_menu_model.cc
+++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc
@@ -8,7 +8,6 @@
#include <cmath>
#include "base/command_line.h"
-#include "base/i18n/number_formatting.h"
#include "base/prefs/pref_service.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
@@ -278,7 +277,6 @@ bool WrenchMenuModel::IsItemForCommandIdDynamic(int command_id) const {
#elif defined(OS_WIN)
command_id == IDC_PIN_TO_START_SCREEN ||
#endif
- command_id == IDC_VIEW_BACKGROUND_PAGES ||
command_id == IDC_UPGRADE_DIALOG ||
command_id == IDC_SHOW_SIGNIN;
}
@@ -308,12 +306,6 @@ string16 WrenchMenuModel::GetLabelForCommandId(int command_id) const {
return l10n_util::GetStringUTF16(string_id);
}
#endif
- case IDC_VIEW_BACKGROUND_PAGES: {
- string16 num_background_pages = base::FormatNumber(
- TaskManager::GetBackgroundPageCount());
- return l10n_util::GetStringFUTF16(IDS_VIEW_BACKGROUND_PAGES,
- num_background_pages);
- }
case IDC_UPGRADE_DIALOG:
return GetUpgradeDialogMenuItemName();
case IDC_SHOW_SIGNIN:
@@ -428,8 +420,6 @@ bool WrenchMenuModel::IsCommandIdVisible(int command_id) const {
#endif
} else if (command_id == IDC_UPGRADE_DIALOG) {
return UpgradeDetector::GetInstance()->notify_upgrade();
- } else if (command_id == IDC_VIEW_BACKGROUND_PAGES) {
- return TaskManager::GetBackgroundPageCount() > 0;
}
return true;
}
@@ -601,19 +591,12 @@ void WrenchMenuModel::Build(bool is_new_menu) {
IDS_TOGGLE_REQUEST_TABLET_SITE);
#endif
-// On ChromeOS-Touch, we don't want the about/background pages menu options.
+// On ChromeOS-Touch, we don't want the about menu option.
#if defined(OS_CHROMEOS)
if (!is_new_menu)
#endif
{
AddItem(IDC_ABOUT, l10n_util::GetStringUTF16(IDS_ABOUT));
- // We use the task manager to show background pages.
- if (chrome::CanOpenTaskManager()) {
- string16 num_background_pages = base::FormatNumber(
- TaskManager::GetBackgroundPageCount());
- AddItem(IDC_VIEW_BACKGROUND_PAGES, l10n_util::GetStringFUTF16(
- IDS_VIEW_BACKGROUND_PAGES, num_background_pages));
- }
}
if (browser_defaults::kShowUpgradeMenuItem)
diff --git a/chrome/browser/ui/views/task_manager_view.cc b/chrome/browser/ui/views/task_manager_view.cc
index 183a2b4..65195cd 100644
--- a/chrome/browser/ui/views/task_manager_view.cc
+++ b/chrome/browser/ui/views/task_manager_view.cc
@@ -29,7 +29,6 @@
#include "ui/base/models/table_model.h"
#include "ui/base/models/table_model_observer.h"
#include "ui/gfx/canvas.h"
-#include "ui/views/background.h"
#include "ui/views/context_menu_controller.h"
#include "ui/views/controls/button/label_button.h"
#include "ui/views/controls/link.h"
@@ -38,7 +37,6 @@
#include "ui/views/controls/table/table_grouper.h"
#include "ui/views/controls/table/table_view.h"
#include "ui/views/controls/table/table_view_observer.h"
-#include "ui/views/controls/table/table_view_row_background_painter.h"
#include "ui/views/layout/layout_constants.h"
#include "ui/views/widget/widget.h"
#include "ui/views/window/dialog_delegate.h"
@@ -51,10 +49,6 @@
#include "win8/util/win8_util.h"
#endif
-// Yellow highlight used when highlighting background resources.
-static const SkColor kBackgroundResourceHighlight =
- SkColorSetRGB(0xff, 0xf1, 0xcd);
-
namespace {
////////////////////////////////////////////////////////////////////////////////
@@ -93,9 +87,6 @@ class TaskManagerTableModel
virtual void OnItemsAdded(int start, int length) OVERRIDE;
virtual void OnItemsRemoved(int start, int length) OVERRIDE;
- // Returns true if resource corresponding to |row| is a background resource.
- bool IsBackgroundResource(int row);
-
private:
TaskManagerModel* model_;
ui::TableModelObserver* observer_;
@@ -170,28 +161,6 @@ void TaskManagerTableModel::OnItemsRemoved(int start, int length) {
OnModelChanged();
}
-bool TaskManagerTableModel::IsBackgroundResource(int row) {
- return model_->IsBackgroundResource(row);
-}
-
-class BackgroundPainter : public views::TableViewRowBackgroundPainter {
- public:
- explicit BackgroundPainter(TaskManagerTableModel* model) : model_(model) {}
- virtual ~BackgroundPainter() {}
-
- virtual void PaintRowBackground(int model_index,
- const gfx::Rect& row_bounds,
- gfx::Canvas* canvas) OVERRIDE {
- if (model_->IsBackgroundResource(model_index))
- canvas->FillRect(row_bounds, kBackgroundResourceHighlight);
- }
-
- private:
- TaskManagerTableModel* model_;
-
- DISALLOW_COPY_AND_ASSIGN(BackgroundPainter);
-};
-
// The Task manager UI container.
class TaskManagerView : public views::ButtonListener,
public views::DialogDelegateView,
@@ -200,14 +169,11 @@ class TaskManagerView : public views::ButtonListener,
public views::ContextMenuController,
public ui::SimpleMenuModel::Delegate {
public:
- TaskManagerView(bool highlight_background_resources,
- chrome::HostDesktopType desktop_type);
+ explicit TaskManagerView(chrome::HostDesktopType desktop_type);
virtual ~TaskManagerView();
- // Shows the Task manager window, or re-activates an existing one. If
- // |highlight_background_resources| is true, highlights the background
- // resources in the resource display.
- static void Show(bool highlight_background_resources, Browser* browser);
+ // Shows the Task manager window, or re-activates an existing one.
+ static void Show(Browser* browser);
// views::View:
virtual void Layout() OVERRIDE;
@@ -288,9 +254,6 @@ class TaskManagerView : public views::ButtonListener,
// True when the Task Manager window should be shown on top of other windows.
bool is_always_on_top_;
- // True when the Task Manager should highlight background resources.
- const bool highlight_background_resources_;
-
// The host desktop type this task manager belongs to.
const chrome::HostDesktopType desktop_type_;
@@ -310,8 +273,7 @@ class TaskManagerView : public views::ButtonListener,
TaskManagerView* TaskManagerView::instance_ = NULL;
-TaskManagerView::TaskManagerView(bool highlight_background_resources,
- chrome::HostDesktopType desktop_type)
+TaskManagerView::TaskManagerView(chrome::HostDesktopType desktop_type)
: purge_memory_button_(NULL),
kill_button_(NULL),
about_memory_link_(NULL),
@@ -320,7 +282,6 @@ TaskManagerView::TaskManagerView(bool highlight_background_resources,
task_manager_(TaskManager::GetInstance()),
model_(TaskManager::GetInstance()->model()),
is_always_on_top_(false),
- highlight_background_resources_(highlight_background_resources),
desktop_type_(desktop_type) {
Init();
}
@@ -394,12 +355,6 @@ void TaskManagerView::Init() {
tab_table_ = new views::TableView(
table_model_.get(), columns_, views::ICON_AND_TEXT, false);
tab_table_->SetGrouper(table_model_.get());
- if (highlight_background_resources_) {
- scoped_ptr<BackgroundPainter> painter(
- new BackgroundPainter(table_model_.get()));
- tab_table_->SetRowBackgroundPainter(
- painter.PassAs<views::TableViewRowBackgroundPainter>());
- }
// Hide some columns by default
tab_table_->SetColumnVisibility(IDS_TASK_MANAGER_PROFILE_NAME_COLUMN, false);
@@ -529,8 +484,7 @@ gfx::Size TaskManagerView::GetPreferredSize() {
}
// static
-void TaskManagerView::Show(bool highlight_background_resources,
- Browser* browser) {
+void TaskManagerView::Show(Browser* browser) {
#if defined(OS_WIN)
// In Windows Metro it's not good to open this native window.
DCHECK(!win8::IsSingleWindowMetroMode());
@@ -541,17 +495,11 @@ void TaskManagerView::Show(bool highlight_background_resources,
browser ? browser->host_desktop_type() : chrome::HOST_DESKTOP_TYPE_ASH;
if (instance_) {
- if (instance_->highlight_background_resources_ !=
- highlight_background_resources ||
- instance_->desktop_type_ != desktop_type) {
- instance_->GetWidget()->Close();
- } else {
- // If there's a Task manager window open already, just activate it.
- instance_->GetWidget()->Activate();
- return;
- }
+ // If there's a Task manager window open already, just activate it.
+ instance_->GetWidget()->Activate();
+ return;
}
- instance_ = new TaskManagerView(highlight_background_resources, desktop_type);
+ instance_ = new TaskManagerView(desktop_type);
gfx::NativeWindow window =
browser ? browser->window()->GetNativeWindow() : NULL;
#if defined(USE_ASH)
@@ -779,8 +727,8 @@ bool TaskManagerView::GetSavedAlwaysOnTopState(bool* always_on_top) const {
namespace chrome {
// Declared in browser_dialogs.h so others don't need to depend on our header.
-void ShowTaskManager(Browser* browser, bool highlight_background_resources) {
- TaskManagerView::Show(highlight_background_resources, browser);
+void ShowTaskManager(Browser* browser) {
+ TaskManagerView::Show(browser);
}
} // namespace chrome
diff --git a/chrome/browser/ui/webui/task_manager/task_manager_handler.cc b/chrome/browser/ui/webui/task_manager/task_manager_handler.cc
index afb3960..42a74a4 100644
--- a/chrome/browser/ui/webui/task_manager/task_manager_handler.cc
+++ b/chrome/browser/ui/webui/task_manager/task_manager_handler.cc
@@ -264,10 +264,8 @@ base::DictionaryValue* TaskManagerHandler::CreateTaskGroupValue(
int index = model_->GetResourceIndexForGroup(group_index, 0);
int length = model_->GetGroupRangeForResource(index).second;
- // Forces to set following 3 columns regardless of |enable_columns|.
+ // Forces to set following column regardless of |enable_columns|.
val->SetInteger("index", index);
- val->SetBoolean("isBackgroundResource",
- model_->IsBackgroundResource(index));
CreateGroupColumnList("processId", index, 1, val);
CreateGroupColumnList("type", index, length, val);
CreateGroupColumnList("uniqueId", index, length, val);
diff --git a/chrome/common/extensions/docs/templates/articles/event_pages.html b/chrome/common/extensions/docs/templates/articles/event_pages.html
index 36285f2..7c6c422 100644
--- a/chrome/common/extensions/docs/templates/articles/event_pages.html
+++ b/chrome/common/extensions/docs/templates/articles/event_pages.html
@@ -90,8 +90,7 @@ only prevents it from closing once loaded.
<p>
Make sure your event page closes as soon as the event that
opened it is processed.
-You can observe the lifetime of your event page by clicking
-on "View Background Pages" in the Chrome menu, or by
+You can observe the lifetime of your event page by
opening Chrome's task manager. You can see when your event
page loads and unloads by observing when an entry for your
extension appears in the list of processes.