| 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_process.h" | 18 #include "chrome/browser/browser_process.h" |
| 19 #include "chrome/browser/extensions/extension_host.h" | 19 #include "chrome/browser/extensions/extension_host.h" |
| 20 #include "chrome/browser/extensions/extension_process_manager.h" | 20 #include "chrome/browser/extensions/extension_process_manager.h" |
| 21 #include "chrome/browser/extensions/extension_service.h" | 21 #include "chrome/browser/extensions/extension_service.h" |
| 22 #include "chrome/browser/favicon_tab_helper.h" | |
| 23 #include "chrome/browser/notifications/balloon_collection.h" | 22 #include "chrome/browser/notifications/balloon_collection.h" |
| 24 #include "chrome/browser/notifications/balloon_host.h" | 23 #include "chrome/browser/notifications/balloon_host.h" |
| 25 #include "chrome/browser/notifications/notification_ui_manager.h" | 24 #include "chrome/browser/notifications/notification_ui_manager.h" |
| 26 #include "chrome/browser/prerender/prerender_contents.h" | 25 #include "chrome/browser/prerender/prerender_contents.h" |
| 27 #include "chrome/browser/prerender/prerender_manager.h" | 26 #include "chrome/browser/prerender/prerender_manager.h" |
| 28 #include "chrome/browser/profiles/profile_manager.h" | 27 #include "chrome/browser/profiles/profile_manager.h" |
| 29 #include "chrome/browser/tab_contents/background_contents.h" | 28 #include "chrome/browser/tab_contents/background_contents.h" |
| 30 #include "chrome/browser/tab_contents/tab_util.h" | 29 #include "chrome/browser/tab_contents/tab_util.h" |
| 31 #include "chrome/browser/ui/browser_list.h" | 30 #include "chrome/browser/ui/browser_list.h" |
| 32 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 31 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 tab_contents_->profile()->GetExtensionService(); | 195 tab_contents_->profile()->GetExtensionService(); |
| 197 int message_id = GetMessagePrefixID( | 196 int message_id = GetMessagePrefixID( |
| 198 extensions_service->IsInstalledApp( | 197 extensions_service->IsInstalledApp( |
| 199 tab_contents_->tab_contents()->GetURL()), | 198 tab_contents_->tab_contents()->GetURL()), |
| 200 tab_contents_->tab_contents()->HostsExtension(), | 199 tab_contents_->tab_contents()->HostsExtension(), |
| 201 tab_contents_->profile()->IsOffTheRecord()); | 200 tab_contents_->profile()->IsOffTheRecord()); |
| 202 return l10n_util::GetStringFUTF16(message_id, tab_title); | 201 return l10n_util::GetStringFUTF16(message_id, tab_title); |
| 203 } | 202 } |
| 204 | 203 |
| 205 SkBitmap TaskManagerTabContentsResource::GetIcon() const { | 204 SkBitmap TaskManagerTabContentsResource::GetIcon() const { |
| 206 return tab_contents_->favicon_tab_helper()->GetFavicon(); | 205 return tab_contents_->tab_contents()->GetFavicon(); |
| 207 } | 206 } |
| 208 | 207 |
| 209 TabContentsWrapper* TaskManagerTabContentsResource::GetTabContents() const { | 208 TabContentsWrapper* TaskManagerTabContentsResource::GetTabContents() const { |
| 210 return tab_contents_; | 209 return tab_contents_; |
| 211 } | 210 } |
| 212 | 211 |
| 213 const Extension* TaskManagerTabContentsResource::GetExtension() const { | 212 const Extension* TaskManagerTabContentsResource::GetExtension() const { |
| 214 if (tab_contents_->tab_contents()->HostsExtension()) { | 213 if (tab_contents_->tab_contents()->HostsExtension()) { |
| 215 ExtensionService* extensions_service = | 214 ExtensionService* extensions_service = |
| 216 tab_contents_->profile()->GetExtensionService(); | 215 tab_contents_->profile()->GetExtensionService(); |
| (...skipping 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1569 | 1568 |
| 1570 return &resource_; | 1569 return &resource_; |
| 1571 } | 1570 } |
| 1572 | 1571 |
| 1573 void TaskManagerBrowserProcessResourceProvider::StartUpdating() { | 1572 void TaskManagerBrowserProcessResourceProvider::StartUpdating() { |
| 1574 task_manager_->AddResource(&resource_); | 1573 task_manager_->AddResource(&resource_); |
| 1575 } | 1574 } |
| 1576 | 1575 |
| 1577 void TaskManagerBrowserProcessResourceProvider::StopUpdating() { | 1576 void TaskManagerBrowserProcessResourceProvider::StopUpdating() { |
| 1578 } | 1577 } |
| OLD | NEW |