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..e12a92f43c5657099664f67f9f86f56f9cdf901e |
--- /dev/null |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/VoiceSearchTabHelper.java |
@@ -0,0 +1,35 @@ |
+// Copyright 2013 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.ContentViewCore; |
+import org.chromium.content.browser.WebContents; |
+import org.chromium.content.browser.WebContentsObserverAndroid; |
+ |
+/** |
+ * Tab helper to toggle media autoplay for voice URL searches. |
+ */ |
+public class VoiceSearchTabHelper extends WebContentsObserverAndroid { |
+ private static final String TAG = "VoiceSearchTabHelper"; |
David Trainor- moved to gerrit
2013/12/30 18:14:30
No need for tag since it's never used
apiccion
2013/12/31 18:52:46
Dead code.
|
+ private long mNativeVoiceSearchTabHelper; |
David Trainor- moved to gerrit
2013/12/30 18:14:30
Who sets this guy? Someone needs to build this an
apiccion
2013/12/31 18:52:46
Dead code.
|
+ private WebContents mWebContents; |
+ |
+ /** |
+ * Create an instance of VoiceSearchTabHelper. |
+ * |
+ * @param contentViewCore ContentViewCore to update media autoplay status. |
+ */ |
+ public VoiceSearchTabHelper(ContentViewCore contentViewCore) { |
+ super(contentViewCore); |
+ mWebContents = contentViewCore.getWebContents(); |
+ } |
+ |
+ @Override |
+ public void navigationEntryCommitted() { |
+ nativeUpdateAutoplayStatus(mWebContents); |
+ } |
+ |
+ private native void nativeUpdateAutoplayStatus(WebContents webContents); |
+} |