OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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. |
| 4 |
| 5 #include "ui/android/event_handler.h" |
| 6 |
| 7 #include "base/android/scoped_java_ref.h" |
| 8 #include "jni/EventHandler_jni.h" |
| 9 #include "ui/android/view_android.h" |
| 10 |
| 11 using base::android::JavaParamRef; |
| 12 using base::android::ScopedJavaLocalRef; |
| 13 |
| 14 namespace ui { |
| 15 |
| 16 // static |
| 17 void OnPhysicalBackingSizeChanged(JNIEnv* env, |
| 18 const JavaParamRef<jclass>& jcaller, |
| 19 jlong native_view, |
| 20 int width, |
| 21 int height) { |
| 22 ViewAndroid* view_android = reinterpret_cast<ViewAndroid*>(native_view); |
| 23 view_android->OnPhysicalBackingSizeChanged(width, height); |
| 24 } |
| 25 |
| 26 void OnDestroyNativeView(JNIEnv* env, |
| 27 const ScopedJavaLocalRef<jobject>& event_handler) { |
| 28 Java_EventHandler_onDestroyNativeView(env, event_handler); |
| 29 } |
| 30 |
| 31 bool RegisterEventHandler(JNIEnv* env) { |
| 32 return RegisterNativesImpl(env); |
| 33 } |
| 34 |
| 35 } // namespace content |
OLD | NEW |