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

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

Issue 8506003: WebUI TaskManager: Add "Activate page" feature. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fix 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);
52 source->set_json_path("strings.js"); 53 source->set_json_path("strings.js");
53 source->add_resource_path("main.js", IDR_TASK_MANAGER_JS); 54 source->add_resource_path("main.js", IDR_TASK_MANAGER_JS);
54 source->add_resource_path("includes.js", IDR_TASK_MANAGER_INCLUDES_JS); 55 source->add_resource_path("includes.js", IDR_TASK_MANAGER_INCLUDES_JS);
55 source->set_default_resource(IDR_TASK_MANAGER_HTML); 56 source->set_default_resource(IDR_TASK_MANAGER_HTML);
56 57
57 return source; 58 return source;
58 } 59 }
59 60
60 } // namespace 61 } // namespace
61 62
62 /////////////////////////////////////////////////////////////////////////////// 63 ///////////////////////////////////////////////////////////////////////////////
63 // 64 //
64 // TaskManagerUI 65 // TaskManagerUI
65 // 66 //
66 /////////////////////////////////////////////////////////////////////////////// 67 ///////////////////////////////////////////////////////////////////////////////
67 68
68 TaskManagerUI::TaskManagerUI(TabContents* contents) : ChromeWebUI(contents) { 69 TaskManagerUI::TaskManagerUI(TabContents* contents) : ChromeWebUI(contents) {
69 TaskManagerHandler* handler = 70 TaskManagerHandler* handler =
70 new TaskManagerHandler(TaskManager::GetInstance()); 71 new TaskManagerHandler(TaskManager::GetInstance());
71 72
72 handler->Attach(this); 73 handler->Attach(this);
73 handler->Init(); 74 handler->Init();
74 AddMessageHandler(handler); 75 AddMessageHandler(handler);
75 76
76 // Set up the chrome://taskmanager/ source. 77 // Set up the chrome://taskmanager/ source.
77 ChromeWebUIDataSource* html_source = CreateTaskManagerUIHTMLSource(); 78 ChromeWebUIDataSource* html_source = CreateTaskManagerUIHTMLSource();
78 Profile* profile = Profile::FromBrowserContext(contents->browser_context()); 79 Profile* profile = Profile::FromBrowserContext(contents->browser_context());
79 profile->GetChromeURLDataManager()->AddDataSource(html_source); 80 profile->GetChromeURLDataManager()->AddDataSource(html_source);
80 } 81 }
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