Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1303)

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 10542092: Refactor the content interface for RequestMediaAccessPermission. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/browser/profiles/profile_impl_io_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index d7e8cddd362597fb78f7717a3beeb7f6cac7672d..257d472cc3e74d07eb964415ab5a26e0e11ed988 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -66,7 +66,6 @@
#include "chrome/browser/tab_contents/tab_contents_ssl_helper.h"
#include "chrome/browser/tab_contents/tab_util.h"
#include "chrome/browser/toolkit_extra_parts.h"
-#include "chrome/browser/ui/media_stream_infobar_delegate.h"
#include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h"
#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h"
@@ -1099,39 +1098,6 @@ void ChromeContentBrowserClient::AddNewCertificate(
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));
-
- WebContents* contents = tab_util::GetWebContentsByID(
- request->render_process_id, request->render_view_id);
- if (!contents) {
- // Abort, if the tab was closed after the request was made but before we
- // got to this point.
- callback.Run(content::MediaStreamDevices());
- return;
- }
-
- TabContents* tab = TabContents::FromWebContents(contents);
- DCHECK(tab);
-
- InfoBarTabHelper* infobar_helper = tab->infobar_tab_helper();
- InfoBarDelegate* old_infobar = NULL;
- for (size_t i = 0; i < infobar_helper->infobar_count() && !old_infobar; ++i) {
- old_infobar =
- infobar_helper->GetInfoBarDelegateAt(i)->AsMediaStreamInfoBarDelegate();
- }
-
- InfoBarDelegate* infobar = new MediaStreamInfoBarDelegate(infobar_helper,
- request,
- callback);
- if (old_infobar)
- infobar_helper->ReplaceInfoBar(old_infobar, infobar);
- else
- infobar_helper->AddInfoBar(infobar);
-}
-
content::MediaObserver* ChromeContentBrowserClient::GetMediaObserver() {
return MediaInternals::GetInstance();
}
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/browser/profiles/profile_impl_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698