| 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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 return l10n_util::GetStringFUTF16(message_id, tab_title); | 327 return l10n_util::GetStringFUTF16(message_id, tab_title); |
| 328 } | 328 } |
| 329 | 329 |
| 330 string16 TaskManagerTabContentsResource::GetProfileName() const { | 330 string16 TaskManagerTabContentsResource::GetProfileName() const { |
| 331 return GetProfileNameFromInfoCache(tab_contents_->profile()); | 331 return GetProfileNameFromInfoCache(tab_contents_->profile()); |
| 332 } | 332 } |
| 333 | 333 |
| 334 gfx::ImageSkia TaskManagerTabContentsResource::GetIcon() const { | 334 gfx::ImageSkia TaskManagerTabContentsResource::GetIcon() const { |
| 335 if (IsPrerendering()) | 335 if (IsPrerendering()) |
| 336 return *prerender_icon_; | 336 return *prerender_icon_; |
| 337 return tab_contents_->favicon_tab_helper()->GetFavicon(); | 337 return tab_contents_->favicon_tab_helper()->GetFavicon().AsImageSkia(); |
| 338 } | 338 } |
| 339 | 339 |
| 340 WebContents* TaskManagerTabContentsResource::GetWebContents() const { | 340 WebContents* TaskManagerTabContentsResource::GetWebContents() const { |
| 341 return tab_contents_->web_contents(); | 341 return tab_contents_->web_contents(); |
| 342 } | 342 } |
| 343 | 343 |
| 344 const Extension* TaskManagerTabContentsResource::GetExtension() const { | 344 const Extension* TaskManagerTabContentsResource::GetExtension() const { |
| 345 if (HostsExtension()) { | 345 if (HostsExtension()) { |
| 346 ExtensionService* extension_service = | 346 ExtensionService* extension_service = |
| 347 tab_contents_->profile()->GetExtensionService(); | 347 tab_contents_->profile()->GetExtensionService(); |
| (...skipping 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1691 | 1691 |
| 1692 return &resource_; | 1692 return &resource_; |
| 1693 } | 1693 } |
| 1694 | 1694 |
| 1695 void TaskManagerBrowserProcessResourceProvider::StartUpdating() { | 1695 void TaskManagerBrowserProcessResourceProvider::StartUpdating() { |
| 1696 task_manager_->AddResource(&resource_); | 1696 task_manager_->AddResource(&resource_); |
| 1697 } | 1697 } |
| 1698 | 1698 |
| 1699 void TaskManagerBrowserProcessResourceProvider::StopUpdating() { | 1699 void TaskManagerBrowserProcessResourceProvider::StopUpdating() { |
| 1700 } | 1700 } |
| OLD | NEW |