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

Side by Side Diff: chrome/browser/task_manager/task_manager_resource_providers.cc

Issue 10175008: Improving the process model extension API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Improved task manager sample and minor cleanup. Created 8 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/task_manager/task_manager_resource_providers.h" 5 #include "chrome/browser/task_manager/task_manager_resource_providers.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after
1104 base::Bind( 1104 base::Bind(
1105 &TaskManagerChildProcessResourceProvider::ChildProcessDataRetreived, 1105 &TaskManagerChildProcessResourceProvider::ChildProcessDataRetreived,
1106 this, child_processes)); 1106 this, child_processes));
1107 } 1107 }
1108 1108
1109 // This is called on the UI thread. 1109 // This is called on the UI thread.
1110 void TaskManagerChildProcessResourceProvider::ChildProcessDataRetreived( 1110 void TaskManagerChildProcessResourceProvider::ChildProcessDataRetreived(
1111 const std::vector<content::ChildProcessData>& child_processes) { 1111 const std::vector<content::ChildProcessData>& child_processes) {
1112 for (size_t i = 0; i < child_processes.size(); ++i) 1112 for (size_t i = 0; i < child_processes.size(); ++i)
1113 Add(child_processes[i]); 1113 Add(child_processes[i]);
1114
1115 content::NotificationService::current()->Notify(
1116 chrome::NOTIFICATION_TASK_MANAGER_CHILD_PROCESSES_DATA_READY,
1117 content::Source<TaskManagerChildProcessResourceProvider>(this),
1118 content::NotificationService::NoDetails());
1114 } 1119 }
1115 1120
1116 //////////////////////////////////////////////////////////////////////////////// 1121 ////////////////////////////////////////////////////////////////////////////////
1117 // TaskManagerExtensionProcessResource class 1122 // TaskManagerExtensionProcessResource class
1118 //////////////////////////////////////////////////////////////////////////////// 1123 ////////////////////////////////////////////////////////////////////////////////
1119 1124
1120 SkBitmap* TaskManagerExtensionProcessResource::default_icon_ = NULL; 1125 SkBitmap* TaskManagerExtensionProcessResource::default_icon_ = NULL;
1121 1126
1122 TaskManagerExtensionProcessResource::TaskManagerExtensionProcessResource( 1127 TaskManagerExtensionProcessResource::TaskManagerExtensionProcessResource(
1123 content::RenderViewHost* render_view_host) 1128 content::RenderViewHost* render_view_host)
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
1492 1497
1493 return &resource_; 1498 return &resource_;
1494 } 1499 }
1495 1500
1496 void TaskManagerBrowserProcessResourceProvider::StartUpdating() { 1501 void TaskManagerBrowserProcessResourceProvider::StartUpdating() {
1497 task_manager_->AddResource(&resource_); 1502 task_manager_->AddResource(&resource_);
1498 } 1503 }
1499 1504
1500 void TaskManagerBrowserProcessResourceProvider::StopUpdating() { 1505 void TaskManagerBrowserProcessResourceProvider::StopUpdating() {
1501 } 1506 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698