Preparation work for adding the Media Stream infobar. The behaviour is the same
as without this patch (and everything is still behind a flag).

BUG=105115
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123418 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index b0ad9d5..1fe87c0 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -1056,6 +1056,24 @@
   new SSLAddCertHandler(request, cert, render_process_id, render_view_id);
 }
 
+void ChromeContentBrowserClient::RequestMediaAccessPermission(
+    const content::MediaStreamRequest* request,
+    const content::MediaResponseCallback& callback) {
+  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+
+  content::MediaStreamDeviceArray devices;
+  for (content::MediaStreamDeviceMap::const_iterator it =
+       request->devices.begin(); it != request->devices.end(); ++it) {
+    devices.push_back(*it->second.begin());
+  }
+
+  // TODO(macourteau): This is temporary. The base::Callback object will be
+  // passed to the Infobar, which will Run it with the request's label and the
+  // list of accepted devices (if any), or an empty list of devices if the user
+  // has denied the request.
+  callback.Run(devices);
+}
+
 void ChromeContentBrowserClient::RequestDesktopNotificationPermission(
     const GURL& source_origin,
     int callback_context,