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; |