Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: ui/base/android/view_android.cc

Issue 147533004: Remove unneeded JNI registrations. (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Fix android webview build issues. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/base/android/view_android.h" 5 #include "ui/base/android/view_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_helper.h" 8 #include "base/android/jni_helper.h"
9 #include "base/android/scoped_java_ref.h" 9 #include "base/android/scoped_java_ref.h"
10 #include "jni/ViewAndroid_jni.h" 10 #include "jni/ViewAndroid_jni.h"
(...skipping 17 matching lines...) Expand all
28 // It is mandatory to explicitly call destroy() before releasing the java 28 // It is mandatory to explicitly call destroy() before releasing the java
29 // side object. This could be changed in future by adding CleanupReference 29 // side object. This could be changed in future by adding CleanupReference
30 // based destruct path; 30 // based destruct path;
31 return weak_java_view_.get(AttachCurrentThread()); 31 return weak_java_view_.get(AttachCurrentThread());
32 } 32 }
33 33
34 WindowAndroid* ViewAndroid::GetWindowAndroid() { 34 WindowAndroid* ViewAndroid::GetWindowAndroid() {
35 return window_android_; 35 return window_android_;
36 } 36 }
37 37
38 bool ViewAndroid::RegisterViewAndroid(JNIEnv* env) {
39 return RegisterNativesImpl(env);
40 }
41
42 ViewAndroid::~ViewAndroid() { 38 ViewAndroid::~ViewAndroid() {
43 } 39 }
44 40
45 jlong Init(JNIEnv* env, jobject obj, jlong window) { 41 jlong Init(JNIEnv* env, jobject obj, jlong window) {
46 ViewAndroid* view = new ViewAndroid( 42 ViewAndroid* view = new ViewAndroid(
47 env, obj, reinterpret_cast<ui::WindowAndroid*>(window)); 43 env, obj, reinterpret_cast<ui::WindowAndroid*>(window));
48 return reinterpret_cast<intptr_t>(view); 44 return reinterpret_cast<intptr_t>(view);
49 } 45 }
50 46
51 } // namespace ui 47 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698