OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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.infobar; |
| 6 |
| 7 import org.chromium.chrome.browser.snackbar.SnackbarManager.SnackbarController; |
| 8 |
| 9 /** |
| 10 * The controller for translate UI snackbars. |
| 11 */ |
| 12 class TranslateSnackbarController implements SnackbarController { |
| 13 @Override |
| 14 public void onDismissNoAction(Object actionData) { |
| 15 // No action. |
| 16 } |
| 17 |
| 18 @Override |
| 19 public void onAction(Object actionData) { |
| 20 nativeToggleTranslateOption(((Integer) actionData).intValue()); |
| 21 } |
| 22 |
| 23 private static native void nativeToggleTranslateOption(int type); |
| 24 }; |
OLD | NEW |