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

Side by Side Diff: services/native_viewport/platform_viewport_android.h

Issue 856063002: Adding keyboard service. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix local variable Created 5 years, 11 months 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SERVICES_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_ANDROID_H_ 5 #ifndef SERVICES_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_ANDROID_H_
6 #define SERVICES_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_ANDROID_H_ 6 #define SERVICES_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_ANDROID_H_
7 7
8 #include "base/android/jni_weak_ref.h" 8 #include "base/android/jni_weak_ref.h"
9 #include "base/android/scoped_java_ref.h" 9 #include "base/android/scoped_java_ref.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 22 matching lines...) Expand all
33 void Destroy(JNIEnv* env, jobject obj); 33 void Destroy(JNIEnv* env, jobject obj);
34 void SurfaceCreated(JNIEnv* env, jobject obj, jobject jsurface); 34 void SurfaceCreated(JNIEnv* env, jobject obj, jobject jsurface);
35 void SurfaceDestroyed(JNIEnv* env, jobject obj); 35 void SurfaceDestroyed(JNIEnv* env, jobject obj);
36 void SurfaceSetSize(JNIEnv* env, 36 void SurfaceSetSize(JNIEnv* env,
37 jobject obj, 37 jobject obj,
38 jint width, 38 jint width,
39 jint height, 39 jint height,
40 jfloat density); 40 jfloat density);
41 bool TouchEvent(JNIEnv* env, jobject obj, jint pointer_id, jint action, 41 bool TouchEvent(JNIEnv* env, jobject obj, jint pointer_id, jint action,
42 jfloat x, jfloat y, jlong time_ms); 42 jfloat x, jfloat y, jlong time_ms);
43 bool KeyEvent(JNIEnv* env,
44 jobject obj,
45 bool pressed,
46 jint key_code,
47 jint unicode_character);
43 48
44 private: 49 private:
45 // Overridden from PlatformViewport: 50 // Overridden from PlatformViewport:
46 virtual void Init(const gfx::Rect& bounds) override; 51 virtual void Init(const gfx::Rect& bounds) override;
47 virtual void Show() override; 52 virtual void Show() override;
48 virtual void Hide() override; 53 virtual void Hide() override;
49 virtual void Close() override; 54 virtual void Close() override;
50 virtual gfx::Size GetSize() override; 55 virtual gfx::Size GetSize() override;
51 virtual void SetBounds(const gfx::Rect& bounds) override; 56 virtual void SetBounds(const gfx::Rect& bounds) override;
52 virtual void SetCapture() override; 57 virtual void SetCapture() override;
53 virtual void ReleaseCapture() override; 58 virtual void ReleaseCapture() override;
54 59
55 void ReleaseWindow(); 60 void ReleaseWindow();
56 61
57 Delegate* delegate_; 62 Delegate* delegate_;
58 ANativeWindow* window_; 63 ANativeWindow* window_;
59 mojo::ViewportMetricsPtr metrics_; 64 mojo::ViewportMetricsPtr metrics_;
60 ui::SequentialIDGenerator id_generator_; 65 ui::SequentialIDGenerator id_generator_;
61 66
62 base::WeakPtrFactory<PlatformViewportAndroid> weak_factory_; 67 base::WeakPtrFactory<PlatformViewportAndroid> weak_factory_;
63 68
64 DISALLOW_COPY_AND_ASSIGN(PlatformViewportAndroid); 69 DISALLOW_COPY_AND_ASSIGN(PlatformViewportAndroid);
65 }; 70 };
66 71
67 } // namespace native_viewport 72 } // namespace native_viewport
68 73
69 #endif // SERVICES_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_ANDROID_H_ 74 #endif // SERVICES_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698