| 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..cc3b6006c5a3b5764ca87be144cdd262741153be
|
| --- /dev/null
|
| +++ b/ui/android/event_handler.cc
|
| @@ -0,0 +1,37 @@
|
| +// 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;
|
| +
|
| +namespace ui {
|
| +
|
| +// static
|
| +void SetEventHandler(JNIEnv* env,
|
| + const JavaParamRef<jclass>& jcaller,
|
| + jlong native_view) {
|
| + ViewAndroid* view_android = reinterpret_cast<ViewAndroid*>(native_view);
|
| + view_android->OnSetEventHandler();
|
| +}
|
| +
|
| +// 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);
|
| +}
|
| +
|
| +bool RegisterEventHandler(JNIEnv* env) {
|
| + return RegisterNativesImpl(env);
|
| +}
|
| +
|
| +} // namespace content
|
|
|