This change removes market specific search provider configuration for Bing. Using...
[chromium-blink-merge.git] / base / android / jni_onload_delegate.h
blobef1b13729fb65f6706dde781f72054824fb5c86e
1 // Copyright 2015 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 #ifndef BASE_ANDROID_JNI_ONLOAD_DELEGATE_H_
6 #define BASE_ANDROID_JNI_ONLOAD_DELEGATE_H_
8 #include <jni.h>
10 #include "base/base_export.h"
12 namespace base {
13 namespace android {
15 // This delegate class is used to implement component specific JNI registration
16 // and initialization. All methods are called in JNI_OnLoad().
18 // Both RegisterJNI() and Init() methods are called if the shared library
19 // is loaded by crazy linker that can't find JNI methods without JNI
20 // registration, otherwise, only Init() is invoked where dynamic lookup is
21 // used to find the JNI methods.
23 // It is important to make sure the JNI registration code is only in
24 // RegisterJNI(), so it could be stripped out when JNI registration isn't
25 // needed.
26 class BASE_EXPORT JNIOnLoadDelegate {
27 public:
28 virtual ~JNIOnLoadDelegate() {}
30 // Returns whether the JNI registration succeeded.
31 virtual bool RegisterJNI(JNIEnv* env) = 0;
33 // Returns whether the initialization succeeded. This method is called after
34 // RegisterJNI(), all JNI methods shall ready to be used.
35 virtual bool Init() = 0;
38 } // namespace android
39 } // namespace base
41 #endif // BASE_ANDROID_JNI_ONLOAD_DELEGATE_H_