| 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 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 base::i18n::AdjustStringForLocaleDirection(&title); | 563 base::i18n::AdjustStringForLocaleDirection(&title); |
| 564 | 564 |
| 565 return l10n_util::GetStringFUTF16(message_prefix_id_, title); | 565 return l10n_util::GetStringFUTF16(message_prefix_id_, title); |
| 566 } | 566 } |
| 567 | 567 |
| 568 string16 TaskManagerPanelResource::GetProfileName() const { | 568 string16 TaskManagerPanelResource::GetProfileName() const { |
| 569 return GetProfileNameFromInfoCache(panel_->profile()); | 569 return GetProfileNameFromInfoCache(panel_->profile()); |
| 570 } | 570 } |
| 571 | 571 |
| 572 gfx::ImageSkia TaskManagerPanelResource::GetIcon() const { | 572 gfx::ImageSkia TaskManagerPanelResource::GetIcon() const { |
| 573 return panel_->GetCurrentPageIcon(); | 573 gfx::Image icon = panel_->GetCurrentPageIcon(); |
| 574 return icon.IsEmpty() ? gfx::ImageSkia() : *icon.ToImageSkia(); |
| 574 } | 575 } |
| 575 | 576 |
| 576 WebContents* TaskManagerPanelResource::GetWebContents() const { | 577 WebContents* TaskManagerPanelResource::GetWebContents() const { |
| 577 return panel_->GetWebContents(); | 578 return panel_->GetWebContents(); |
| 578 } | 579 } |
| 579 | 580 |
| 580 const Extension* TaskManagerPanelResource::GetExtension() const { | 581 const Extension* TaskManagerPanelResource::GetExtension() const { |
| 581 ExtensionService* extension_service = | 582 ExtensionService* extension_service = |
| 582 panel_->profile()->GetExtensionService(); | 583 panel_->profile()->GetExtensionService(); |
| 583 return extension_service->extensions()->GetByID(panel_->extension_id()); | 584 return extension_service->extensions()->GetByID(panel_->extension_id()); |
| (...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1691 | 1692 |
| 1692 return &resource_; | 1693 return &resource_; |
| 1693 } | 1694 } |
| 1694 | 1695 |
| 1695 void TaskManagerBrowserProcessResourceProvider::StartUpdating() { | 1696 void TaskManagerBrowserProcessResourceProvider::StartUpdating() { |
| 1696 task_manager_->AddResource(&resource_); | 1697 task_manager_->AddResource(&resource_); |
| 1697 } | 1698 } |
| 1698 | 1699 |
| 1699 void TaskManagerBrowserProcessResourceProvider::StopUpdating() { | 1700 void TaskManagerBrowserProcessResourceProvider::StopUpdating() { |
| 1700 } | 1701 } |
| OLD | NEW |