Index: ui/android/event_handler.h |
diff --git a/ui/android/event_handler.h b/ui/android/event_handler.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..affdaba537981b9771fc87701a29084cff44a772 |
--- /dev/null |
+++ b/ui/android/event_handler.h |
@@ -0,0 +1,43 @@ |
+// 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. |
+ |
+#ifndef UI_ANDROID_EVENT_HANDLER_H_ |
+#define UI_ANDROID_EVENT_HANDLER_H_ |
+ |
+#include "base/android/jni_android.h" |
+#include "base/android/scoped_java_ref.h" |
+#include "ui/android/ui_android_export.h" |
+ |
+namespace ui { |
+ |
+class ViewAndroid; |
+ |
+// A simple container for a UI layer. |
+// At the root of the hierarchy is a WindowAndroid, when attached. |
+class UI_ANDROID_EXPORT EventHandler { |
boliu
2016/12/02 23:53:22
ViewAndroid::GetEventHandler definitely should not
Jinsuk Kim
2016/12/05 11:07:44
Removed the class EventHandler and defined the exa
|
+ public: |
+ EventHandler(ViewAndroid* view); |
+ |
+ void OnPhysicalBackingSizeChanged(JNIEnv* env, |
+ const base::android::JavaParamRef<jobject>& obj, |
+ int width, |
+ int height); |
+ |
+ int GetPhysicalBackingSizeWidthPix(); |
+ int GetPhysicalBackingSizeHeightPix(); |
+ |
+ private: |
+ ui::ViewAndroid* view_; |
+ |
+ int physical_width_pix_; |
boliu
2016/12/02 23:53:22
this is a property on ViewAndroid, not handler
th
Jinsuk Kim
2016/12/05 11:07:44
Moved the properties to ViewAndroid.
I *think* th
boliu
2016/12/06 00:10:17
Yes
Jinsuk Kim
2016/12/06 07:35:07
Traced the code and found that child nodes are all
boliu
2016/12/06 19:13:59
I don't see why not, in the name of correctness. Y
Jinsuk Kim
2016/12/07 12:36:28
Done.
|
+ int physical_height_pix_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(EventHandler); |
+}; |
+ |
+bool RegisterEventHandler(JNIEnv* env); |
+ |
+} // namespace ui |
+ |
+#endif // UI_ANDROID_EVENT_HANDLER_H_ |