OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/child_process_resource_provider.h" | 5 #include "chrome/browser/task_manager/child_process_resource_provider.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 break; | 246 break; |
247 case content::PROCESS_TYPE_UNKNOWN: | 247 case content::PROCESS_TYPE_UNKNOWN: |
248 NOTREACHED() << "Need localized name for child process type."; | 248 NOTREACHED() << "Need localized name for child process type."; |
249 } | 249 } |
250 | 250 |
251 return title; | 251 return title; |
252 } | 252 } |
253 | 253 |
254 void ChildProcessResource::Refresh() { | 254 void ChildProcessResource::Refresh() { |
255 if (resource_usage_) | 255 if (resource_usage_) |
256 resource_usage_->Refresh(); | 256 resource_usage_->Refresh(base::Closure()); |
257 } | 257 } |
258 | 258 |
259 bool ChildProcessResource::ReportsV8MemoryStats() const { | 259 bool ChildProcessResource::ReportsV8MemoryStats() const { |
260 if (resource_usage_) | 260 if (resource_usage_) |
261 return resource_usage_->ReportsV8MemoryStats(); | 261 return resource_usage_->ReportsV8MemoryStats(); |
262 return false; | 262 return false; |
263 } | 263 } |
264 | 264 |
265 size_t ChildProcessResource::GetV8MemoryAllocated() const { | 265 size_t ChildProcessResource::GetV8MemoryAllocated() const { |
266 if (resource_usage_) | 266 if (resource_usage_) |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 // This is called on the UI thread. | 401 // This is called on the UI thread. |
402 void ChildProcessResourceProvider::ChildProcessDataRetreived( | 402 void ChildProcessResourceProvider::ChildProcessDataRetreived( |
403 const std::vector<content::ChildProcessData>& child_processes) { | 403 const std::vector<content::ChildProcessData>& child_processes) { |
404 for (size_t i = 0; i < child_processes.size(); ++i) | 404 for (size_t i = 0; i < child_processes.size(); ++i) |
405 AddToTaskManager(child_processes[i]); | 405 AddToTaskManager(child_processes[i]); |
406 | 406 |
407 task_manager_->model()->NotifyDataReady(); | 407 task_manager_->model()->NotifyDataReady(); |
408 } | 408 } |
409 | 409 |
410 } // namespace task_manager | 410 } // namespace task_manager |
OLD | NEW |