OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 package org.chromium.chrome.browser; |
| 6 |
| 7 import org.chromium.content.browser.WebContentsObserverAndroid; |
| 8 import org.chromium.content_public.browser.WebContents; |
| 9 |
| 10 /** |
| 11 * Tab helper to toggle media autoplay for voice URL searches. |
| 12 */ |
| 13 public class VoiceSearchTabHelper extends WebContentsObserverAndroid { |
| 14 private final WebContents mWebContents; |
| 15 |
| 16 /** |
| 17 * Create an instance of VoiceSearchTabHelper. |
| 18 * |
| 19 * @param webContents WebContents to update media autoplay status. |
| 20 */ |
| 21 public VoiceSearchTabHelper(WebContents webContents) { |
| 22 super(webContents); |
| 23 mWebContents = webContents; |
| 24 } |
| 25 |
| 26 @Override |
| 27 public void navigationEntryCommitted() { |
| 28 nativeUpdateAutoplayStatus(mWebContents); |
| 29 } |
| 30 |
| 31 private native void nativeUpdateAutoplayStatus(WebContents webContents); |
| 32 } |
OLD | NEW |