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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/VoiceSearchTabHelper.java

Issue 453023002: Revert of Enable HTMLMediaElement@autoplay on Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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/android/java/src/org/chromium/chrome/browser/Tab.java ('k') | chrome/browser/about_flags.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/VoiceSearchTabHelper.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/VoiceSearchTabHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/VoiceSearchTabHelper.java
new file mode 100644
index 0000000000000000000000000000000000000000..1a74d5cd564b94fa7c61d37fbf2f281607d63196
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/VoiceSearchTabHelper.java
@@ -0,0 +1,32 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser;
+
+import org.chromium.content.browser.WebContentsObserverAndroid;
+import org.chromium.content_public.browser.WebContents;
+
+/**
+ * Tab helper to toggle media autoplay for voice URL searches.
+ */
+public class VoiceSearchTabHelper extends WebContentsObserverAndroid {
+ private final WebContents mWebContents;
+
+ /**
+ * Create an instance of VoiceSearchTabHelper.
+ *
+ * @param webContents WebContents to update media autoplay status.
+ */
+ public VoiceSearchTabHelper(WebContents webContents) {
+ super(webContents);
+ mWebContents = webContents;
+ }
+
+ @Override
+ public void navigationEntryCommitted() {
+ nativeUpdateAutoplayStatus(mWebContents);
+ }
+
+ private native void nativeUpdateAutoplayStatus(WebContents webContents);
+}
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/Tab.java ('k') | chrome/browser/about_flags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698