Index: ui/android/event_handler.cc |
diff --git a/ui/android/event_handler.cc b/ui/android/event_handler.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b4bd58436ff815d9d5b758051d4cc4f3390da50c |
--- /dev/null |
+++ b/ui/android/event_handler.cc |
@@ -0,0 +1,35 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "ui/android/event_handler.h" |
+ |
+#include "base/android/scoped_java_ref.h" |
+#include "jni/EventHandler_jni.h" |
+#include "ui/android/view_android.h" |
+ |
+using base::android::JavaParamRef; |
+using base::android::ScopedJavaLocalRef; |
+ |
+namespace ui { |
+ |
+// static |
+void OnPhysicalBackingSizeChanged(JNIEnv* env, |
+ const JavaParamRef<jclass>& jcaller, |
+ jlong native_view, |
+ int width, |
+ int height) { |
+ ViewAndroid* view_android = reinterpret_cast<ViewAndroid*>(native_view); |
+ view_android->OnPhysicalBackingSizeChanged(width, height); |
+} |
+ |
+void OnDestroyNativeView(JNIEnv* env, |
+ const ScopedJavaLocalRef<jobject>& event_handler) { |
+ Java_EventHandler_onDestroyNativeView(env, event_handler); |
+} |
+ |
+bool RegisterEventHandler(JNIEnv* env) { |
+ return RegisterNativesImpl(env); |
+} |
+ |
+} // namespace content |