Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(384)

Side by Side Diff: ui/android/event_handler.h

Issue 2502763003: Introduce ViewRoot to forward input/view events to native (Closed)
Patch Set: lazy creation Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 #ifndef UI_ANDROID_EVENT_HANDLER_H_
6 #define UI_ANDROID_EVENT_HANDLER_H_
7
8 #include "base/android/jni_android.h"
9 #include "base/android/scoped_java_ref.h"
10 #include "ui/android/ui_android_export.h"
11
12 namespace ui {
13
14 class ViewAndroid;
15
16 // A simple container for a UI layer.
17 // At the root of the hierarchy is a WindowAndroid, when attached.
18 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
19 public:
20 EventHandler(ViewAndroid* view);
21
22 void OnPhysicalBackingSizeChanged(JNIEnv* env,
23 const base::android::JavaParamRef<jobject>& obj,
24 int width,
25 int height);
26
27 int GetPhysicalBackingSizeWidthPix();
28 int GetPhysicalBackingSizeHeightPix();
29
30 private:
31 ui::ViewAndroid* view_;
32
33 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.
34 int physical_height_pix_;
35
36 DISALLOW_COPY_AND_ASSIGN(EventHandler);
37 };
38
39 bool RegisterEventHandler(JNIEnv* env);
40
41 } // namespace ui
42
43 #endif // UI_ANDROID_EVENT_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698