| 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..e21ac87f915c276a2b692ee38994396e939670a6 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 {
|
| + ExtensionsService* extension_service = profile()->GetExtensionsService();
|
| +
|
| + // Check for hosted app.
|
| + if (extension_service->GetExtensionByWebExtent(GetURL()) != NULL)
|
| + return true;
|
| +
|
| + // Check for packaged app.
|
| + const Extension* extension =
|
| + extension_service->GetExtensionByURL(GetURL());
|
| + return extension != NULL && extension->is_app();
|
| +}
|
| +
|
| void TabContents::SetExtensionApp(const Extension* extension) {
|
| DCHECK(!extension || extension->GetFullLaunchURL().is_valid());
|
| extension_app_ = extension;
|
|
|