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

Side by Side Diff: chrome/browser/ui/webui/task_manager_ui.cc

Issue 8515001: Revert 109394 - WebUI TaskManager: Add "Activate page" feature. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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/ui/webui/task_manager_handler.cc ('k') | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/webui/task_manager_ui.h" 5 #include "chrome/browser/ui/webui/task_manager_ui.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/task_manager/task_manager.h" 9 #include "chrome/browser/task_manager/task_manager.h"
10 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" 10 #include "chrome/browser/ui/webui/chrome_url_data_manager.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 SET_LOCALIZED_STRING(SHARED_MEM_COLUMN); 42 SET_LOCALIZED_STRING(SHARED_MEM_COLUMN);
43 SET_LOCALIZED_STRING(PRIVATE_MEM_COLUMN); 43 SET_LOCALIZED_STRING(PRIVATE_MEM_COLUMN);
44 SET_LOCALIZED_STRING(GOATS_TELEPORTED_COLUMN); 44 SET_LOCALIZED_STRING(GOATS_TELEPORTED_COLUMN);
45 SET_LOCALIZED_STRING(WEBCORE_IMAGE_CACHE_COLUMN); 45 SET_LOCALIZED_STRING(WEBCORE_IMAGE_CACHE_COLUMN);
46 SET_LOCALIZED_STRING(WEBCORE_SCRIPTS_CACHE_COLUMN); 46 SET_LOCALIZED_STRING(WEBCORE_SCRIPTS_CACHE_COLUMN);
47 SET_LOCALIZED_STRING(WEBCORE_CSS_CACHE_COLUMN); 47 SET_LOCALIZED_STRING(WEBCORE_CSS_CACHE_COLUMN);
48 SET_LOCALIZED_STRING(FPS_COLUMN); 48 SET_LOCALIZED_STRING(FPS_COLUMN);
49 SET_LOCALIZED_STRING(SQLITE_MEMORY_USED_COLUMN); 49 SET_LOCALIZED_STRING(SQLITE_MEMORY_USED_COLUMN);
50 SET_LOCALIZED_STRING(JAVASCRIPT_MEMORY_ALLOCATED_COLUMN); 50 SET_LOCALIZED_STRING(JAVASCRIPT_MEMORY_ALLOCATED_COLUMN);
51 SET_LOCALIZED_STRING(INSPECT); 51 SET_LOCALIZED_STRING(INSPECT);
52 SET_LOCALIZED_STRING(ACTIVATE);
53 source->set_json_path("strings.js"); 52 source->set_json_path("strings.js");
54 source->add_resource_path("main.js", IDR_TASK_MANAGER_JS); 53 source->add_resource_path("main.js", IDR_TASK_MANAGER_JS);
55 source->add_resource_path("includes.js", IDR_TASK_MANAGER_INCLUDES_JS); 54 source->add_resource_path("includes.js", IDR_TASK_MANAGER_INCLUDES_JS);
56 source->set_default_resource(IDR_TASK_MANAGER_HTML); 55 source->set_default_resource(IDR_TASK_MANAGER_HTML);
57 56
58 return source; 57 return source;
59 } 58 }
60 59
61 } // namespace 60 } // namespace
62 61
63 /////////////////////////////////////////////////////////////////////////////// 62 ///////////////////////////////////////////////////////////////////////////////
64 // 63 //
65 // TaskManagerUI 64 // TaskManagerUI
66 // 65 //
67 /////////////////////////////////////////////////////////////////////////////// 66 ///////////////////////////////////////////////////////////////////////////////
68 67
69 TaskManagerUI::TaskManagerUI(TabContents* contents) : ChromeWebUI(contents) { 68 TaskManagerUI::TaskManagerUI(TabContents* contents) : ChromeWebUI(contents) {
70 TaskManagerHandler* handler = 69 TaskManagerHandler* handler =
71 new TaskManagerHandler(TaskManager::GetInstance()); 70 new TaskManagerHandler(TaskManager::GetInstance());
72 71
73 handler->Attach(this); 72 handler->Attach(this);
74 handler->Init(); 73 handler->Init();
75 AddMessageHandler(handler); 74 AddMessageHandler(handler);
76 75
77 // Set up the chrome://taskmanager/ source. 76 // Set up the chrome://taskmanager/ source.
78 ChromeWebUIDataSource* html_source = CreateTaskManagerUIHTMLSource(); 77 ChromeWebUIDataSource* html_source = CreateTaskManagerUIHTMLSource();
79 Profile* profile = Profile::FromBrowserContext(contents->browser_context()); 78 Profile* profile = Profile::FromBrowserContext(contents->browser_context());
80 profile->GetChromeURLDataManager()->AddDataSource(html_source); 79 profile->GetChromeURLDataManager()->AddDataSource(html_source);
81 } 80 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/task_manager_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698