Fix build break
[chromium-blink-merge.git] / chrome / browser / android / content_view_util.cc
blobad9914627f629da3e9b8c107019dd395cf06efa9
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 #include "chrome/browser/android/content_view_util.h"
7 #include "base/android/jni_android.h"
8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/profiles/profile_manager.h"
11 #include "content/public/browser/web_contents.h"
12 #include "jni/ContentViewUtil_jni.h"
14 static jint CreateNativeWebContents(
15 JNIEnv* env, jclass clazz, jboolean incognito) {
16 Profile* profile = g_browser_process->profile_manager()->GetLastUsedProfile();
17 if (incognito)
18 profile = profile->GetOffTheRecordProfile();
20 content::WebContents* web_contents =
21 content::WebContents::Create(content::WebContents::CreateParams(profile));
22 return reinterpret_cast<jint>(web_contents);
25 bool RegisterContentViewUtil(JNIEnv* env) {
26 return RegisterNativesImpl(env);