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 <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/file_version_info.h" | 10 #include "base/file_version_info.h" |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 // web-based Email :BAT", in which the capital letters "BAT" stands for | 248 // web-based Email :BAT", in which the capital letters "BAT" stands for |
249 // the Hebrew word for "tab". | 249 // the Hebrew word for "tab". |
250 base::i18n::AdjustStringForLocaleDirection(&tab_title); | 250 base::i18n::AdjustStringForLocaleDirection(&tab_title); |
251 } | 251 } |
252 | 252 |
253 // Only classify as an app if the URL is an app and the tab is hosting an | 253 // Only classify as an app if the URL is an app and the tab is hosting an |
254 // extension process. (It's possible to be showing the URL from before it | 254 // extension process. (It's possible to be showing the URL from before it |
255 // was installed as an app.) | 255 // was installed as an app.) |
256 ExtensionService* extensions_service = | 256 ExtensionService* extensions_service = |
257 tab_contents_->profile()->GetExtensionService(); | 257 tab_contents_->profile()->GetExtensionService(); |
| 258 ExtensionProcessManager* extension_process_manager = |
| 259 tab_contents_->profile()->GetExtensionProcessManager(); |
258 bool is_app = extensions_service->IsInstalledApp(url) && | 260 bool is_app = extensions_service->IsInstalledApp(url) && |
259 contents->GetRenderProcessHost()->is_extension_process(); | 261 extension_process_manager->IsExtensionProcess( |
| 262 contents->GetRenderProcessHost()->id()); |
260 | 263 |
261 int message_id = GetMessagePrefixID( | 264 int message_id = GetMessagePrefixID( |
262 is_app, | 265 is_app, |
263 HostsExtension(), | 266 HostsExtension(), |
264 tab_contents_->profile()->IsOffTheRecord(), | 267 tab_contents_->profile()->IsOffTheRecord(), |
265 IsPrerendering()); | 268 IsPrerendering()); |
266 return l10n_util::GetStringFUTF16(message_id, tab_title); | 269 return l10n_util::GetStringFUTF16(message_id, tab_title); |
267 } | 270 } |
268 | 271 |
269 string16 TaskManagerTabContentsResource::GetProfileName() const { | 272 string16 TaskManagerTabContentsResource::GetProfileName() const { |
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1348 | 1351 |
1349 return &resource_; | 1352 return &resource_; |
1350 } | 1353 } |
1351 | 1354 |
1352 void TaskManagerBrowserProcessResourceProvider::StartUpdating() { | 1355 void TaskManagerBrowserProcessResourceProvider::StartUpdating() { |
1353 task_manager_->AddResource(&resource_); | 1356 task_manager_->AddResource(&resource_); |
1354 } | 1357 } |
1355 | 1358 |
1356 void TaskManagerBrowserProcessResourceProvider::StopUpdating() { | 1359 void TaskManagerBrowserProcessResourceProvider::StopUpdating() { |
1357 } | 1360 } |
OLD | NEW |