1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 package org.chromium.chrome.browser;
7 import org.chromium.content.browser.WebContentsObserver;
8 import org.chromium.content_public.browser.WebContents;
11 * Tab helper to toggle media autoplay for voice URL searches.
13 public class VoiceSearchTabHelper extends WebContentsObserver {
14 private final WebContents mWebContents;
17 * Create an instance of VoiceSearchTabHelper.
19 * @param webContents WebContents to update media autoplay status.
21 public VoiceSearchTabHelper(WebContents webContents) {
23 mWebContents = webContents;
27 public void navigationEntryCommitted() {
28 nativeUpdateAutoplayStatus(mWebContents);
31 private native void nativeUpdateAutoplayStatus(WebContents webContents);