| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/file_version_info.h" | 8 #include "base/file_version_info.h" |
| 9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
| 10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
| 11 #include "base/stl_util-inl.h" | 11 #include "base/stl_util-inl.h" |
| 12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
| 13 #include "base/threading/thread.h" | 13 #include "base/threading/thread.h" |
| 14 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
| 15 #include "build/build_config.h" | 15 #include "build/build_config.h" |
| 16 #include "chrome/app/chrome_command_ids.h" | 16 #include "chrome/app/chrome_command_ids.h" |
| 17 #include "chrome/browser/background_contents_service.h" | 17 #include "chrome/browser/background_contents_service.h" |
| 18 #include "chrome/browser/browser_list.h" | 18 #include "chrome/browser/browser_list.h" |
| 19 #include "chrome/browser/browser_process.h" | 19 #include "chrome/browser/browser_process.h" |
| 20 #include "chrome/browser/extensions/extension_host.h" | 20 #include "chrome/browser/extensions/extension_host.h" |
| 21 #include "chrome/browser/extensions/extension_process_manager.h" | 21 #include "chrome/browser/extensions/extension_process_manager.h" |
| 22 #include "chrome/browser/extensions/extension_service.h" | 22 #include "chrome/browser/extensions/extension_service.h" |
| 23 #include "chrome/browser/favicon_tab_helper.h" |
| 23 #include "chrome/browser/notifications/balloon_collection.h" | 24 #include "chrome/browser/notifications/balloon_collection.h" |
| 24 #include "chrome/browser/notifications/balloon_host.h" | 25 #include "chrome/browser/notifications/balloon_host.h" |
| 25 #include "chrome/browser/notifications/notification_ui_manager.h" | 26 #include "chrome/browser/notifications/notification_ui_manager.h" |
| 26 #include "chrome/browser/prerender/prerender_contents.h" | 27 #include "chrome/browser/prerender/prerender_contents.h" |
| 27 #include "chrome/browser/prerender/prerender_manager.h" | 28 #include "chrome/browser/prerender/prerender_manager.h" |
| 28 #include "chrome/browser/profiles/profile_manager.h" | 29 #include "chrome/browser/profiles/profile_manager.h" |
| 29 #include "chrome/browser/tab_contents/background_contents.h" | 30 #include "chrome/browser/tab_contents/background_contents.h" |
| 30 #include "chrome/browser/tab_contents/tab_util.h" | 31 #include "chrome/browser/tab_contents/tab_util.h" |
| 31 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 32 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 32 #include "chrome/common/extensions/extension.h" | 33 #include "chrome/common/extensions/extension.h" |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 tab_contents_->profile()->GetExtensionService(); | 196 tab_contents_->profile()->GetExtensionService(); |
| 196 int message_id = GetMessagePrefixID( | 197 int message_id = GetMessagePrefixID( |
| 197 extensions_service->IsInstalledApp( | 198 extensions_service->IsInstalledApp( |
| 198 tab_contents_->tab_contents()->GetURL()), | 199 tab_contents_->tab_contents()->GetURL()), |
| 199 tab_contents_->tab_contents()->HostsExtension(), | 200 tab_contents_->tab_contents()->HostsExtension(), |
| 200 tab_contents_->profile()->IsOffTheRecord()); | 201 tab_contents_->profile()->IsOffTheRecord()); |
| 201 return l10n_util::GetStringFUTF16(message_id, tab_title); | 202 return l10n_util::GetStringFUTF16(message_id, tab_title); |
| 202 } | 203 } |
| 203 | 204 |
| 204 SkBitmap TaskManagerTabContentsResource::GetIcon() const { | 205 SkBitmap TaskManagerTabContentsResource::GetIcon() const { |
| 205 return tab_contents_->tab_contents()->GetFavicon(); | 206 return tab_contents_->favicon_tab_helper()->GetFavicon(); |
| 206 } | 207 } |
| 207 | 208 |
| 208 TabContentsWrapper* TaskManagerTabContentsResource::GetTabContents() const { | 209 TabContentsWrapper* TaskManagerTabContentsResource::GetTabContents() const { |
| 209 return tab_contents_; | 210 return tab_contents_; |
| 210 } | 211 } |
| 211 | 212 |
| 212 const Extension* TaskManagerTabContentsResource::GetExtension() const { | 213 const Extension* TaskManagerTabContentsResource::GetExtension() const { |
| 213 if (tab_contents_->tab_contents()->HostsExtension()) { | 214 if (tab_contents_->tab_contents()->HostsExtension()) { |
| 214 ExtensionService* extensions_service = | 215 ExtensionService* extensions_service = |
| 215 tab_contents_->profile()->GetExtensionService(); | 216 tab_contents_->profile()->GetExtensionService(); |
| (...skipping 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1568 | 1569 |
| 1569 return &resource_; | 1570 return &resource_; |
| 1570 } | 1571 } |
| 1571 | 1572 |
| 1572 void TaskManagerBrowserProcessResourceProvider::StartUpdating() { | 1573 void TaskManagerBrowserProcessResourceProvider::StartUpdating() { |
| 1573 task_manager_->AddResource(&resource_); | 1574 task_manager_->AddResource(&resource_); |
| 1574 } | 1575 } |
| 1575 | 1576 |
| 1576 void TaskManagerBrowserProcessResourceProvider::StopUpdating() { | 1577 void TaskManagerBrowserProcessResourceProvider::StopUpdating() { |
| 1577 } | 1578 } |
| OLD | NEW |