1 // Copyright (c) 2012 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;
8 * This class provides a way to create the native WebContents required for instantiating a
11 public abstract class ContentViewUtil {
12 // Don't instantiate me.
13 private ContentViewUtil() {
17 * @return pointer to native WebContents instance, suitable for using with a
18 * (java) ContentViewCore instance.
20 public static int createNativeWebContents(boolean incognito) {
21 return nativeCreateNativeWebContents(incognito);
25 * @param webContentsPtr The WebContents reference to be deleted.
27 public static void destroyNativeWebContents(int webContentsPtr) {
28 nativeDestroyNativeWebContents(webContentsPtr);
31 private static native int nativeCreateNativeWebContents(boolean incognito);
32 private static native void nativeDestroyNativeWebContents(int webContentsPtr);