Index: blimp/client/app/android/blimp_view.cc |
diff --git a/blimp/client/app/android/blimp_view.cc b/blimp/client/app/android/blimp_view.cc |
index 1aa06d12a6baedbe43111e21afc382b4d1291245..29753cbafe6f65635e6ad7662ae7eb4c717a1cc4 100644 |
--- a/blimp/client/app/android/blimp_view.cc |
+++ b/blimp/client/app/android/blimp_view.cc |
@@ -17,8 +17,6 @@ |
#include "ui/events/android/motion_event_android.h" |
#include "ui/gfx/geometry/size.h" |
-using base::android::JavaParamRef; |
- |
namespace { |
const int kDummyBlimpContentsId = 0; |
} // namespace |
@@ -27,14 +25,15 @@ namespace blimp { |
namespace client { |
namespace app { |
-static jlong Init(JNIEnv* env, |
- const JavaParamRef<jobject>& jobj, |
- const JavaParamRef<jobject>& blimp_client_session, |
- jint real_width, |
- jint real_height, |
- jint width, |
- jint height, |
- jfloat dp_to_px) { |
+static jlong Init( |
+ JNIEnv* env, |
+ const base::android::JavaParamRef<jobject>& jobj, |
+ const base::android::JavaParamRef<jobject>& blimp_client_session, |
+ jint real_width, |
+ jint real_height, |
+ jint width, |
+ jint height, |
+ jfloat dp_to_px) { |
BlimpClientSession* client_session = |
BlimpClientSessionAndroid::FromJavaObject(env, blimp_client_session); |
@@ -53,7 +52,7 @@ bool BlimpView::RegisterJni(JNIEnv* env) { |
} |
BlimpView::BlimpView(JNIEnv* env, |
- const JavaParamRef<jobject>& jobj, |
+ const base::android::JavaParamRef<jobject>& jobj, |
const gfx::Size& real_size, |
const gfx::Size& size, |
float dp_to_px, |
@@ -88,7 +87,8 @@ BlimpView::~BlimpView() { |
compositor_dependencies_.reset(); |
} |
-void BlimpView::Destroy(JNIEnv* env, const JavaParamRef<jobject>& jobj) { |
+void BlimpView::Destroy(JNIEnv* env, |
+ const base::android::JavaParamRef<jobject>& jobj) { |
delete this; |
} |
@@ -101,12 +101,13 @@ void BlimpView::OnContentAreaSizeChanged( |
compositor_->SetSize(gfx::Size(width, height)); |
} |
-void BlimpView::OnSurfaceChanged(JNIEnv* env, |
- const JavaParamRef<jobject>& jobj, |
- jint format, |
- jint width, |
- jint height, |
- const JavaParamRef<jobject>& jsurface) { |
+void BlimpView::OnSurfaceChanged( |
+ JNIEnv* env, |
+ const base::android::JavaParamRef<jobject>& jobj, |
+ jint format, |
+ jint width, |
+ jint height, |
+ const base::android::JavaParamRef<jobject>& jsurface) { |
if (current_surface_format_ != format) { |
current_surface_format_ = format; |
SetSurface(nullptr); |
@@ -117,13 +118,15 @@ void BlimpView::OnSurfaceChanged(JNIEnv* env, |
} |
} |
-void BlimpView::OnSurfaceCreated(JNIEnv* env, |
- const JavaParamRef<jobject>& jobj) { |
+void BlimpView::OnSurfaceCreated( |
+ JNIEnv* env, |
+ const base::android::JavaParamRef<jobject>& jobj) { |
current_surface_format_ = 0 /** PixelFormat.UNKNOWN */; |
} |
-void BlimpView::OnSurfaceDestroyed(JNIEnv* env, |
- const JavaParamRef<jobject>& jobj) { |
+void BlimpView::OnSurfaceDestroyed( |
+ JNIEnv* env, |
+ const base::android::JavaParamRef<jobject>& jobj) { |
current_surface_format_ = 0 /** PixelFormat.UNKNOWN */; |
SetSurface(nullptr); |
} |
@@ -146,34 +149,35 @@ void BlimpView::SetSurface(jobject surface) { |
} |
} |
-jboolean BlimpView::OnTouchEvent(JNIEnv* env, |
- const JavaParamRef<jobject>& obj, |
- const JavaParamRef<jobject>& motion_event, |
- jlong time_ms, |
- jint android_action, |
- jint pointer_count, |
- jint history_size, |
- jint action_index, |
- jfloat pos_x_0, |
- jfloat pos_y_0, |
- jfloat pos_x_1, |
- jfloat pos_y_1, |
- jint pointer_id_0, |
- jint pointer_id_1, |
- jfloat touch_major_0, |
- jfloat touch_major_1, |
- jfloat touch_minor_0, |
- jfloat touch_minor_1, |
- jfloat orientation_0, |
- jfloat orientation_1, |
- jfloat tilt_0, |
- jfloat tilt_1, |
- jfloat raw_pos_x, |
- jfloat raw_pos_y, |
- jint android_tool_type_0, |
- jint android_tool_type_1, |
- jint android_button_state, |
- jint android_meta_state) { |
+jboolean BlimpView::OnTouchEvent( |
+ JNIEnv* env, |
+ const base::android::JavaParamRef<jobject>& obj, |
+ const base::android::JavaParamRef<jobject>& motion_event, |
+ jlong time_ms, |
+ jint android_action, |
+ jint pointer_count, |
+ jint history_size, |
+ jint action_index, |
+ jfloat pos_x_0, |
+ jfloat pos_y_0, |
+ jfloat pos_x_1, |
+ jfloat pos_y_1, |
+ jint pointer_id_0, |
+ jint pointer_id_1, |
+ jfloat touch_major_0, |
+ jfloat touch_major_1, |
+ jfloat touch_minor_0, |
+ jfloat touch_minor_1, |
+ jfloat orientation_0, |
+ jfloat orientation_1, |
+ jfloat tilt_0, |
+ jfloat tilt_1, |
+ jfloat raw_pos_x, |
+ jfloat raw_pos_y, |
+ jint android_tool_type_0, |
+ jint android_tool_type_1, |
+ jint android_button_state, |
+ jint android_meta_state) { |
ui::MotionEventAndroid::Pointer pointer0(pointer_id_0, |
pos_x_0, |
pos_y_0, |