blob: bbaa6c3c22c5ac7033cbc1ccf22f382859479066 [file] [log] [blame]
Avi Drissman4e1b7bc32022-09-15 14:03:501// Copyright 2012 The Chromium Authors
[email protected]a08029b42012-04-25 03:18:462// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]93c9f9b2014-02-10 16:19:225#include "base/android/jni_android.h"
michaelbai842c972d2015-01-28 21:40:366#include "content/public/app/content_jni_onload.h"
[email protected]7bd89172012-06-04 21:48:127#include "content/public/app/content_main.h"
[email protected]993951d2013-05-08 21:37:028#include "content/shell/app/shell_main_delegate.h"
[email protected]a08029b42012-04-25 03:18:469
michaelbai842c972d2015-01-28 21:40:3610// This is called by the VM when the shared library is first loaded.
11JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
tobiasjsb9e287e2017-02-08 11:09:5012 base::android::InitVM(vm);
Jinsuk Kim8d799fe92018-02-21 05:57:5213 if (!content::android::OnJNIOnLoadInit())
14 return -1;
Bo Liu1f7dc0c2017-07-28 18:58:5715 content::SetContentMainDelegate(new content::ShellMainDelegate());
[email protected]a08029b42012-04-25 03:18:4616 return JNI_VERSION_1_4;
17}