15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Copyright (c) 2012 The Chromium Authors. All rights reserved. 25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// found in the LICENSE file. 45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 52a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 65821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "base/android/jni_android.h" 72a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#include "chrome/app/android/chrome_android_initializer.h" 82a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#include "chrome/app/android/chrome_main_delegate_android.h" 95821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// This is called by the VM when the shared library is first loaded. 112a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Note that this file must be included in the final shared_library build step 122a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// and not in a static library or the JNI_OnLoad symbol won't be included 132a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// because the Android build is compiled with exclude-libs=ALL to reduce symbol 142a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// size. 155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) { 162a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) return RunChrome(vm, ChromeMainDelegateAndroid::Create()); 175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)} 18