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

Unified Diff: chrome/browser/media/media_stream_devices_controller.cc

Issue 416053002: Revert of Turn webspeech on/off when tab goes fore/background (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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/media/media_stream_devices_controller.h ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media/media_stream_devices_controller.cc
diff --git a/chrome/browser/media/media_stream_devices_controller.cc b/chrome/browser/media/media_stream_devices_controller.cc
index 431af985362b043c48a232b1c535c8c0baebccfb..1103f9af842553ecfca9291206d657caa8c569f8 100644
--- a/chrome/browser/media/media_stream_devices_controller.cc
+++ b/chrome/browser/media/media_stream_devices_controller.cc
@@ -23,7 +23,6 @@
#include "chrome/common/pref_names.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "content/public/browser/browser_thread.h"
-#include "content/public/browser/render_widget_host_view.h"
#include "content/public/common/media_stream_request.h"
#include "extensions/common/constants.h"
#include "grit/generated_resources.h"
@@ -663,7 +662,7 @@
const {
MediaStreamTypeSettingsMap::const_iterator it =
request_permissions_.find(content::MEDIA_DEVICE_AUDIO_CAPTURE);
- return (it != request_permissions_.end() && IsCaptureDeviceRequestAllowed() &&
+ return (it != request_permissions_.end() &&
it->second.permission == MEDIA_ALLOWED);
}
@@ -671,15 +670,6 @@
const {
MediaStreamTypeSettingsMap::const_iterator it =
request_permissions_.find(content::MEDIA_DEVICE_VIDEO_CAPTURE);
- return (it != request_permissions_.end() && IsCaptureDeviceRequestAllowed() &&
+ return (it != request_permissions_.end() &&
it->second.permission == MEDIA_ALLOWED);
}
-
-bool MediaStreamDevicesController::IsCaptureDeviceRequestAllowed() const {
-#if defined(OS_ANDROID)
- // Don't approve device requests if the tab was hidden.
- // TODO(qinmin): Add a test for this. http://crbug.com/396869.
- return web_contents_->GetRenderWidgetHostView()->IsShowing();
-#endif
- return true;
-}
« no previous file with comments | « chrome/browser/media/media_stream_devices_controller.h ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698