First step to create application shortcuts on Linux.

Create a working desktop shortcut. For now it displays no UI, but the backend works.

TEST=none
http://crbug.com/17251

Review URL: http://codereview.chromium.org/164280

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23226 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index f6e6687..36a5d7e 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -45,6 +45,7 @@
 #include "chrome/browser/thumbnail_store.h"
 #include "chrome/browser/search_engines/template_url_fetcher.h"
 #include "chrome/browser/search_engines/template_url_model.h"
+#include "chrome/browser/shell_integration.h"
 #include "chrome/common/chrome_switches.h"
 #include "chrome/common/notification_service.h"
 #include "chrome/common/page_action.h"
@@ -743,6 +744,10 @@
   if (!entry)
     return;
 
+#if defined(OS_LINUX)
+  // TODO(phajdan.jr): Finish creating shortcuts (UI etc).
+  ShellIntegration::CreateDesktopShortcut(GetURL(), GetTitle());
+#else
   // We only allow one pending install request. By resetting the page id we
   // effectively cancel the pending install request.
   pending_install_.page_id = entry->page_id();
@@ -760,6 +765,7 @@
   // Request the application info. When done OnDidGetApplicationInfo is invoked
   // and we'll create the shortcut.
   render_view_host()->GetApplicationInfo(pending_install_.page_id);
+#endif
 }
 
 void TabContents::ShowPageInfo(const GURL& url,