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 |
| 13 namespace ui { |
| 14 |
| 15 // static |
| 16 void SetEventHandler(JNIEnv* env, |
| 17 const JavaParamRef<jclass>& jcaller, |
| 18 jlong native_view) { |
| 19 ViewAndroid* view_android = reinterpret_cast<ViewAndroid*>(native_view); |
| 20 view_android->OnSetEventHandler(); |
| 21 } |
| 22 |
| 23 // static |
| 24 void OnPhysicalBackingSizeChanged(JNIEnv* env, |
| 25 const JavaParamRef<jclass>& jcaller, |
| 26 jlong native_view, |
| 27 int width, |
| 28 int height) { |
| 29 ViewAndroid* view_android = reinterpret_cast<ViewAndroid*>(native_view); |
| 30 view_android->OnPhysicalBackingSizeChanged(width, height); |
| 31 } |
| 32 |
| 33 bool RegisterEventHandler(JNIEnv* env) { |
| 34 return RegisterNativesImpl(env); |
| 35 } |
| 36 |
| 37 } // namespace content |
OLD | NEW |