| 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/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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 DCHECK(is_instant_preview_); | 273 DCHECK(is_instant_preview_); |
| 274 is_instant_preview_ = false; | 274 is_instant_preview_ = false; |
| 275 } | 275 } |
| 276 | 276 |
| 277 bool TaskManagerTabContentsResource::IsPrerendering() const { | 277 bool TaskManagerTabContentsResource::IsPrerendering() const { |
| 278 prerender::PrerenderManager* prerender_manager = | 278 prerender::PrerenderManager* prerender_manager = |
| 279 prerender::PrerenderManagerFactory::GetForProfile( | 279 prerender::PrerenderManagerFactory::GetForProfile( |
| 280 tab_contents_->profile()); | 280 tab_contents_->profile()); |
| 281 return prerender_manager && | 281 return prerender_manager && |
| 282 prerender_manager->IsWebContentsPrerendering( | 282 prerender_manager->IsWebContentsPrerendering( |
| 283 tab_contents_->web_contents()); | 283 tab_contents_->web_contents(), NULL); |
| 284 } | 284 } |
| 285 | 285 |
| 286 bool TaskManagerTabContentsResource::HostsExtension() const { | 286 bool TaskManagerTabContentsResource::HostsExtension() const { |
| 287 return tab_contents_->web_contents()->GetURL().SchemeIs( | 287 return tab_contents_->web_contents()->GetURL().SchemeIs( |
| 288 chrome::kExtensionScheme); | 288 chrome::kExtensionScheme); |
| 289 } | 289 } |
| 290 | 290 |
| 291 TaskManager::Resource::Type TaskManagerTabContentsResource::GetType() const { | 291 TaskManager::Resource::Type TaskManagerTabContentsResource::GetType() const { |
| 292 return HostsExtension() ? EXTENSION : RENDERER; | 292 return HostsExtension() ? EXTENSION : RENDERER; |
| 293 } | 293 } |
| (...skipping 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1687 | 1687 |
| 1688 return &resource_; | 1688 return &resource_; |
| 1689 } | 1689 } |
| 1690 | 1690 |
| 1691 void TaskManagerBrowserProcessResourceProvider::StartUpdating() { | 1691 void TaskManagerBrowserProcessResourceProvider::StartUpdating() { |
| 1692 task_manager_->AddResource(&resource_); | 1692 task_manager_->AddResource(&resource_); |
| 1693 } | 1693 } |
| 1694 | 1694 |
| 1695 void TaskManagerBrowserProcessResourceProvider::StopUpdating() { | 1695 void TaskManagerBrowserProcessResourceProvider::StopUpdating() { |
| 1696 } | 1696 } |
| OLD | NEW |