Skip to content

Commit

Permalink
Remove all RegisterNativesImpl() in android_webview/
Browse files Browse the repository at this point in the history
Bug: 749244
Change-Id: Ie459e247d0d779b09357d9a7b26eed5b8d157fb0
Reviewed-on: https://chromium-review.googlesource.com/588084
Commit-Queue: Shimi Zhang <ctzsm@chromium.org>
Reviewed-by: Bo Liu <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490313}
  • Loading branch information
Shimi Zhang authored and Commit Bot committed Jul 28, 2017
1 parent d3e6933 commit 2285f05
Show file tree
Hide file tree
Showing 50 changed files with 2 additions and 334 deletions.
7 changes: 0 additions & 7 deletions android_webview/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,6 @@ source_set("common") {
"browser/address_parser_internal.h",
"browser/android_protocol_handler.cc",
"browser/android_protocol_handler.h",
"browser/android_webview_jni_registrar.cc",
"browser/android_webview_jni_registrar.h",
"browser/aw_autofill_client.cc",
"browser/aw_autofill_client.h",
"browser/aw_browser_context.cc",
Expand All @@ -459,19 +457,16 @@ source_set("common") {
"browser/aw_contents_lifecycle_notifier.cc",
"browser/aw_contents_lifecycle_notifier.h",
"browser/aw_contents_statics.cc",
"browser/aw_contents_statics.h",
"browser/aw_cookie_access_policy.cc",
"browser/aw_cookie_access_policy.h",
"browser/aw_debug.cc",
"browser/aw_debug.h",
"browser/aw_devtools_manager_delegate.cc",
"browser/aw_devtools_manager_delegate.h",
"browser/aw_devtools_server.cc",
"browser/aw_devtools_server.h",
"browser/aw_download_manager_delegate.cc",
"browser/aw_download_manager_delegate.h",
"browser/aw_form_database.cc",
"browser/aw_form_database.h",
"browser/aw_form_database_service.cc",
"browser/aw_form_database_service.h",
"browser/aw_gl_functor.cc",
Expand Down Expand Up @@ -544,7 +539,6 @@ source_set("common") {
"browser/compositor_id.cc",
"browser/compositor_id.h",
"browser/cookie_manager.cc",
"browser/cookie_manager.h",
"browser/deferred_gpu_command_service.cc",
"browser/deferred_gpu_command_service.h",
"browser/find_helper.cc",
Expand Down Expand Up @@ -621,7 +615,6 @@ source_set("common") {
"browser/surfaces_instance.cc",
"browser/surfaces_instance.h",
"browser/token_binding_manager_bridge.cc",
"browser/token_binding_manager_bridge.h",
"browser/tracing/aw_tracing_delegate.cc",
"browser/tracing/aw_tracing_delegate.h",
"common/android_webview_message_generator.cc",
Expand Down
4 changes: 0 additions & 4 deletions android_webview/browser/android_protocol_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,6 @@ bool ContentSchemeRequestInterceptor::ShouldHandleRequest(

namespace android_webview {

bool RegisterAndroidProtocolHandler(JNIEnv* env) {
return RegisterNativesImpl(env);
}

// static
std::unique_ptr<net::URLRequestInterceptor>
CreateContentSchemeRequestInterceptor() {
Expand Down
4 changes: 0 additions & 4 deletions android_webview/browser/android_protocol_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

#include <memory>

#include "base/android/jni_android.h"

namespace net {
class URLRequestInterceptor;
} // namespace net
Expand All @@ -29,8 +27,6 @@ CreateContentSchemeRequestInterceptor();
// WebSettings.html#setAllowFileAccess(boolean)
std::unique_ptr<net::URLRequestInterceptor> CreateAssetFileRequestInterceptor();

bool RegisterAndroidProtocolHandler(JNIEnv* env);

} // namespace android_webview

#endif // ANDROID_WEBVIEW_BROWSER_ANDROID_PROTOCOL_HANDLER_H_
67 changes: 0 additions & 67 deletions android_webview/browser/android_webview_jni_registrar.cc

This file was deleted.

17 changes: 0 additions & 17 deletions android_webview/browser/android_webview_jni_registrar.h

This file was deleted.

4 changes: 0 additions & 4 deletions android_webview/browser/aw_autofill_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,4 @@ void AwAutofillClient::ScanCreditCard(const CreditCardScanCallback& callback) {
NOTIMPLEMENTED();
}

bool RegisterAwAutofillClient(JNIEnv* env) {
return RegisterNativesImpl(env);
}

} // namespace android_webview
3 changes: 0 additions & 3 deletions android_webview/browser/aw_autofill_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#ifndef ANDROID_WEBVIEW_BROWSER_AW_AUTOFILL_CLIENT_H_
#define ANDROID_WEBVIEW_BROWSER_AW_AUTOFILL_CLIENT_H_

#include <jni.h>
#include <memory>
#include <string>
#include <vector>
Expand Down Expand Up @@ -136,8 +135,6 @@ class AwAutofillClient : public autofill::AutofillClient,
DISALLOW_COPY_AND_ASSIGN(AwAutofillClient);
};

bool RegisterAwAutofillClient(JNIEnv* env);

} // namespace android_webview

#endif // ANDROID_WEBVIEW_BROWSER_AW_AUTOFILL_CLIENT_H_
4 changes: 0 additions & 4 deletions android_webview/browser/aw_contents.cc
Original file line number Diff line number Diff line change
Expand Up @@ -522,10 +522,6 @@ void AwContents::AddVisitedLinks(
->AddVisitedURLs(visited_link_gurls);
}

bool RegisterAwContents(JNIEnv* env) {
return RegisterNativesImpl(env);
}

namespace {

void ShowGeolocationPromptHelperTask(const JavaObjectWeakGlobalRef& java_ref,
Expand Down
4 changes: 0 additions & 4 deletions android_webview/browser/aw_contents.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#ifndef ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_H_
#define ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_H_

#include <jni.h>

#include <list>
#include <memory>
#include <string>
Expand Down Expand Up @@ -424,8 +422,6 @@ class AwContents : public FindHelper::Listener,
DISALLOW_COPY_AND_ASSIGN(AwContents);
};

bool RegisterAwContents(JNIEnv* env);

} // namespace android_webview

#endif // ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_H_
4 changes: 0 additions & 4 deletions android_webview/browser/aw_contents_client_bridge.cc
Original file line number Diff line number Diff line change
Expand Up @@ -571,8 +571,4 @@ void AwContentsClientBridge::CancelJsResult(JNIEnv*,
pending_js_dialog_callbacks_.Remove(id);
}

bool RegisterAwContentsClientBridge(JNIEnv* env) {
return RegisterNativesImpl(env);
}

} // namespace android_webview
3 changes: 0 additions & 3 deletions android_webview/browser/aw_contents_client_bridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#ifndef ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_CLIENT_BRIDGE_H_
#define ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_CLIENT_BRIDGE_H_

#include <jni.h>
#include <memory>

#include "android_webview/browser/aw_safe_browsing_resource_throttle.h"
Expand Down Expand Up @@ -151,8 +150,6 @@ class AwContentsClientBridge {
pending_client_cert_request_delegates_;
};

bool RegisterAwContentsClientBridge(JNIEnv* env);

} // namespace android_webview

#endif // ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_CLIENT_BRIDGE_H_
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ class TestClientCertificateDelegate
void AwContentsClientBridgeTest::SetUp() {
env_ = AttachCurrentThread();
ASSERT_THAT(env_, NotNull());
ASSERT_TRUE(android_webview::RegisterAwContentsClientBridge(env_));
ASSERT_TRUE(net::android::RegisterJni(env_));
jbridge_.Reset(
env_,
Expand Down
6 changes: 0 additions & 6 deletions android_webview/browser/aw_contents_statics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "android_webview/browser/aw_contents_statics.h"

#include "android_webview/browser/address_parser.h"
#include "android_webview/browser/aw_browser_context.h"
#include "android_webview/browser/aw_contents_io_thread_client.h"
Expand Down Expand Up @@ -143,8 +141,4 @@ ScopedJavaLocalRef<jstring> FindAddress(JNIEnv* env,
return ScopedJavaLocalRef<jstring>();
}

bool RegisterAwContentsStatics(JNIEnv* env) {
return RegisterNativesImpl(env);
}

} // namespace android_webview
6 changes: 0 additions & 6 deletions android_webview/browser/aw_debug.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "android_webview/browser/aw_debug.h"

#include "android_webview/common/crash_reporter/aw_microdump_crash_reporter.h"
#include "android_webview/common/crash_reporter/crash_keys.h"
#include "base/android/jni_android.h"
Expand Down Expand Up @@ -51,8 +49,4 @@ static void SetCrashKeyValue(JNIEnv* env,
ConvertJavaStringToUTF8(env, value));
}

bool RegisterAwDebug(JNIEnv* env) {
return RegisterNativesImpl(env);
}

} // namespace android_webview
20 changes: 0 additions & 20 deletions android_webview/browser/aw_debug.h

This file was deleted.

4 changes: 0 additions & 4 deletions android_webview/browser/aw_devtools_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,6 @@ bool AwDevToolsServer::IsStarted() const {
return is_started_;
}

bool RegisterAwDevToolsServer(JNIEnv* env) {
return RegisterNativesImpl(env);
}

static jlong InitRemoteDebugging(JNIEnv* env,
const JavaParamRef<jobject>& obj) {
AwDevToolsServer* server = new AwDevToolsServer();
Expand Down
4 changes: 0 additions & 4 deletions android_webview/browser/aw_devtools_server.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#ifndef ANDROID_WEBVIEW_BROWSER_AW_DEVTOOLS_SERVER_H_
#define ANDROID_WEBVIEW_BROWSER_AW_DEVTOOLS_SERVER_H_

#include <jni.h>

#include <memory>
#include <vector>

Expand All @@ -33,8 +31,6 @@ class AwDevToolsServer {
DISALLOW_COPY_AND_ASSIGN(AwDevToolsServer);
};

bool RegisterAwDevToolsServer(JNIEnv* env);

} // namespace android_webview

#endif // ANDROID_WEBVIEW_BROWSER_AW_DEVTOOLS_SERVER_H_
6 changes: 0 additions & 6 deletions android_webview/browser/aw_form_database.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "android_webview/browser/aw_form_database.h"

#include "android_webview/browser/aw_browser_context.h"
#include "android_webview/browser/aw_content_browser_client.h"
#include "android_webview/browser/aw_form_database_service.h"
Expand Down Expand Up @@ -36,8 +34,4 @@ void ClearFormData(JNIEnv*, const JavaParamRef<jclass>&) {
GetFormDatabaseService()->ClearFormData();
}

bool RegisterAwFormDatabase(JNIEnv* env) {
return RegisterNativesImpl(env);
}

} // namespace android_webview
16 changes: 0 additions & 16 deletions android_webview/browser/aw_form_database.h

This file was deleted.

4 changes: 0 additions & 4 deletions android_webview/browser/aw_gl_functor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,4 @@ static jlong Create(JNIEnv* env,
new AwGLFunctor(JavaObjectWeakGlobalRef(env, obj)));
}

bool RegisterAwGLFunctor(JNIEnv* env) {
return RegisterNativesImpl(env);
}

} // namespace android_webview
4 changes: 0 additions & 4 deletions android_webview/browser/aw_gl_functor.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#ifndef ANDROID_WEBVIEW_BROWSER_AW_GL_FUNCTOR_H_
#define ANDROID_WEBVIEW_BROWSER_AW_GL_FUNCTOR_H_

#include <jni.h>

#include "android_webview/browser/compositor_frame_consumer.h"
#include "android_webview/browser/render_thread_manager.h"
#include "android_webview/browser/render_thread_manager_client.h"
Expand Down Expand Up @@ -39,8 +37,6 @@ class AwGLFunctor : public RenderThreadManagerClient {
RenderThreadManager render_thread_manager_;
};

bool RegisterAwGLFunctor(JNIEnv* env);

} // namespace android_webview

#endif // ANDROID_WEBVIEW_BROWSER_AW_GL_FUNCTOR_H_
Loading

0 comments on commit 2285f05

Please sign in to comment.