Add link URL and success/failure callback parameters to chrome.webstore.install()

The link URL is used to select between multiple <link rel="chrome-webstore-item">
elements on the page.

To keep track of callbacks, an install ID is generated at the start of each
chrome.webstore.install() call, so that the browser knows which ones to invoke
when an install completes.

Also adds validation of install requesting URL against the item's verified
domain (wasn't done until now since it wasn't testable).

[email protected]
BUG=93380

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99889 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/extensions/extension_tab_helper.h b/chrome/browser/extensions/extension_tab_helper.h
index 1b1b5ad..1b4900d 100644
--- a/chrome/browser/extensions/extension_tab_helper.h
+++ b/chrome/browser/extensions/extension_tab_helper.h
@@ -97,7 +97,9 @@
   // Message handlers.
   void OnDidGetApplicationInfo(int32 page_id, const WebApplicationInfo& info);
   void OnInstallApplication(const WebApplicationInfo& info);
-  void OnInlineWebstoreInstall(const std::string& webstore_item_id);
+  void OnInlineWebstoreInstall(int install_id,
+                               const std::string& webstore_item_id,
+                               const GURL& requestor_url);
   void OnRequest(const ExtensionHostMsg_Request_Params& params);
 
   // App extensions related methods:
@@ -111,8 +113,9 @@
                              int index) OVERRIDE;
 
   // WebstoreInlineInstaller::Delegate.
-  virtual void OnInlineInstallSuccess() OVERRIDE;
-  virtual void OnInlineInstallFailure(const std::string& error) OVERRIDE;
+  virtual void OnInlineInstallSuccess(int install_id) OVERRIDE;
+  virtual void OnInlineInstallFailure(int install_id,
+                                      const std::string& error) OVERRIDE;
 
   // Data for app extensions ---------------------------------------------------