| 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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 return l10n_util::GetStringFUTF16(message_id, tab_title); | 333 return l10n_util::GetStringFUTF16(message_id, tab_title); |
| 334 } | 334 } |
| 335 | 335 |
| 336 string16 TaskManagerTabContentsResource::GetProfileName() const { | 336 string16 TaskManagerTabContentsResource::GetProfileName() const { |
| 337 return GetProfileNameFromInfoCache(tab_contents_->profile()); | 337 return GetProfileNameFromInfoCache(tab_contents_->profile()); |
| 338 } | 338 } |
| 339 | 339 |
| 340 gfx::ImageSkia TaskManagerTabContentsResource::GetIcon() const { | 340 gfx::ImageSkia TaskManagerTabContentsResource::GetIcon() const { |
| 341 if (IsPrerendering()) | 341 if (IsPrerendering()) |
| 342 return *prerender_icon_; | 342 return *prerender_icon_; |
| 343 return tab_contents_->favicon_tab_helper()->GetFavicon().AsImageSkia(); | 343 return FaviconTabHelper::FromWebContents(tab_contents_->web_contents())-> |
| 344 GetFavicon().AsImageSkia(); |
| 344 } | 345 } |
| 345 | 346 |
| 346 WebContents* TaskManagerTabContentsResource::GetWebContents() const { | 347 WebContents* TaskManagerTabContentsResource::GetWebContents() const { |
| 347 return tab_contents_->web_contents(); | 348 return tab_contents_->web_contents(); |
| 348 } | 349 } |
| 349 | 350 |
| 350 const Extension* TaskManagerTabContentsResource::GetExtension() const { | 351 const Extension* TaskManagerTabContentsResource::GetExtension() const { |
| 351 if (HostsExtension()) { | 352 if (HostsExtension()) { |
| 352 ExtensionService* extension_service = | 353 ExtensionService* extension_service = |
| 353 tab_contents_->profile()->GetExtensionService(); | 354 tab_contents_->profile()->GetExtensionService(); |
| (...skipping 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1686 | 1687 |
| 1687 return &resource_; | 1688 return &resource_; |
| 1688 } | 1689 } |
| 1689 | 1690 |
| 1690 void TaskManagerBrowserProcessResourceProvider::StartUpdating() { | 1691 void TaskManagerBrowserProcessResourceProvider::StartUpdating() { |
| 1691 task_manager_->AddResource(&resource_); | 1692 task_manager_->AddResource(&resource_); |
| 1692 } | 1693 } |
| 1693 | 1694 |
| 1694 void TaskManagerBrowserProcessResourceProvider::StopUpdating() { | 1695 void TaskManagerBrowserProcessResourceProvider::StopUpdating() { |
| 1695 } | 1696 } |
| OLD | NEW |