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

Unified Diff: chrome/browser/android/voice_search_tab_helper.cc

Issue 2851453003: Revert of Rename kDisableGestureRequirementForMediaPlayback and make it a test-only flag. (Closed)
Patch Set: Created 3 years, 8 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/about_flags.cc ('k') | chrome/browser/flag_descriptions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/voice_search_tab_helper.cc
diff --git a/chrome/browser/android/voice_search_tab_helper.cc b/chrome/browser/android/voice_search_tab_helper.cc
index 417741647ac0ad134bfda791e2566f855e29b983..2b3104b94d0ef9d13367f591990faa12a3a50166 100644
--- a/chrome/browser/android/voice_search_tab_helper.cc
+++ b/chrome/browser/android/voice_search_tab_helper.cc
@@ -8,20 +8,16 @@
#include "components/google/core/browser/google_util.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/common/content_switches.h"
#include "content/public/common/web_preferences.h"
-#include "media/base/media_switches.h"
DEFINE_WEB_CONTENTS_USER_DATA_KEY(VoiceSearchTabHelper);
-// TODO(715588): this class shouldn't be playing with the user gesture
-// requirements like this.
VoiceSearchTabHelper::VoiceSearchTabHelper(content::WebContents* contents)
: content::WebContentsObserver(contents) {
- base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
gesture_requirement_for_playback_disabled_ =
- command_line->HasSwitch(switches::kIgnoreAutoplayRestrictionsForTests) ||
- command_line->GetSwitchValueASCII(switches::kAutoplayPolicy) !=
- switches::autoplay::kNoUserGestureRequiredPolicy;
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableGestureRequirementForMediaPlayback);
}
VoiceSearchTabHelper::~VoiceSearchTabHelper() {
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/flag_descriptions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698