OLD | NEW |
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/worker_resource_provider.h" | 5 #include "chrome/browser/task_manager/worker_resource_provider.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/string16.h" | 10 #include "base/string16.h" |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 } | 134 } |
135 | 135 |
136 void SharedWorkerResource::Inspect() const { | 136 void SharedWorkerResource::Inspect() const { |
137 // TODO(yurys): would be better to get profile from one of the tabs connected | 137 // TODO(yurys): would be better to get profile from one of the tabs connected |
138 // to the worker. | 138 // to the worker. |
139 Profile* profile = ProfileManager::GetLastUsedProfile(); | 139 Profile* profile = ProfileManager::GetLastUsedProfile(); |
140 if (!profile) | 140 if (!profile) |
141 return; | 141 return; |
142 scoped_refptr<DevToolsAgentHost> agent_host( | 142 scoped_refptr<DevToolsAgentHost> agent_host( |
143 DevToolsAgentHost::GetForWorker(process_id_, routing_id_)); | 143 DevToolsAgentHost::GetForWorker(process_id_, routing_id_)); |
144 DevToolsWindow::OpenDevToolsWindowForWorker(profile, agent_host); | 144 DevToolsWindow::OpenDevToolsWindowForWorker(profile, agent_host.get()); |
145 } | 145 } |
146 | 146 |
147 bool SharedWorkerResource::SupportNetworkUsage() const { | 147 bool SharedWorkerResource::SupportNetworkUsage() const { |
148 return false; | 148 return false; |
149 } | 149 } |
150 | 150 |
151 void SharedWorkerResource::SetSupportNetworkUsage() { | 151 void SharedWorkerResource::SetSupportNetworkUsage() { |
152 } | 152 } |
153 | 153 |
154 | 154 |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 } else { | 350 } else { |
351 task_manager_->AddResource(resource); | 351 task_manager_->AddResource(resource); |
352 } | 352 } |
353 } | 353 } |
354 | 354 |
355 void WorkerResourceProvider::DeleteAllResources() { | 355 void WorkerResourceProvider::DeleteAllResources() { |
356 STLDeleteElements(&resources_); | 356 STLDeleteElements(&resources_); |
357 } | 357 } |
358 | 358 |
359 } // namespace task_manager | 359 } // namespace task_manager |
OLD | NEW |