Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4428)

Unified Diff: chrome/browser/tab_contents/tab_contents.cc

Issue 5526002: Show extension tabs in task manager and correctly label apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix resource types and tests. Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/tab_contents/tab_contents.cc
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index 4a225b204b31a088d38e136fab078a03a1489f51..e23ff2004d8c5f25128749d1ad253d2425a65f77 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -586,6 +586,19 @@ RenderProcessHost* TabContents::GetRenderProcessHost() const {
return render_manager_.current_host()->process();
}
+bool TabContents::IsInstalledApp() const {
Erik does not do reviews 2010/12/03 17:04:56 We have this double check logic scattered around a
Charlie Reis 2010/12/03 23:02:16 Done. No more changes to tab_contents needed-- we
+ ExtensionsService* extensions_service = profile()->GetExtensionsService();
+
+ // Check for hosted app.
+ if (extensions_service->GetExtensionByWebExtent(GetURL()) != NULL)
+ return true;
+
+ // Check for packaged app.
+ const Extension* extension =
+ extensions_service->GetExtensionByURL(GetURL());
+ return extension != NULL && extension->is_app();
+}
+
void TabContents::SetExtensionApp(const Extension* extension) {
DCHECK(!extension || extension->GetFullLaunchURL().is_valid());
extension_app_ = extension;

Powered by Google App Engine
This is Rietveld 408576698