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.omnibox;
6 import org.chromium.base.annotations.NativeMethods;
7 
8 /**
9  * Utilities for the Omnibox view component.
10  */
11 public class OmniboxViewUtil {
12 
13     /**
14      * Sanitizing the given string to be safe to paste into the omnibox.
15      *
16      * @param clipboardString The string from the clipboard.
17      * @return The sanitized version of the string.
18      */
sanitizeTextForPaste(String clipboardString)19     public static String sanitizeTextForPaste(String clipboardString) {
20         return OmniboxViewUtilJni.get().sanitizeTextForPaste(clipboardString);
21     }
22 
23     @NativeMethods
24     interface Natives {
sanitizeTextForPaste(String clipboardString)25         String sanitizeTextForPaste(String clipboardString);
26     }
27 }
28