OLD | NEW |
---|---|
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 #include "content/browser/android/content_view_core_impl.h" | 5 #include "content/browser/android/content_view_core_impl.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/android/jni_array.h" | 8 #include "base/android/jni_array.h" |
9 #include "base/android/jni_string.h" | 9 #include "base/android/jni_string.h" |
10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
362 } | 362 } |
363 } | 363 } |
364 } | 364 } |
365 | 365 |
366 void ContentViewCoreImpl::RenderViewReady() { | 366 void ContentViewCoreImpl::RenderViewReady() { |
367 if (device_orientation_ != 0) | 367 if (device_orientation_ != 0) |
368 SendOrientationChangeEventInternal(); | 368 SendOrientationChangeEventInternal(); |
369 } | 369 } |
370 | 370 |
371 void ContentViewCoreImpl::OnGestureEvent(const ui::GestureEventData& gesture) { | 371 void ContentViewCoreImpl::OnGestureEvent(const ui::GestureEventData& gesture) { |
372 SendGestureEvent( | 372 WebGestureEvent event = |
373 CreateWebGestureEventFromGestureEventData(gesture, 1.f / dpi_scale())); | 373 CreateWebGestureEventFromGestureEventData(gesture, 1.f / dpi_scale()); |
374 if (event.type != WebInputEvent::Undefined) | |
jdduke (slow)
2014/04/03 20:17:16
Shouldn't this be a DCHECK? We won't use the Gestu
tdresser
2014/04/03 21:14:41
Done.
| |
375 SendGestureEvent(event); | |
374 } | 376 } |
375 | 377 |
376 RenderWidgetHostViewAndroid* | 378 RenderWidgetHostViewAndroid* |
377 ContentViewCoreImpl::GetRenderWidgetHostViewAndroid() { | 379 ContentViewCoreImpl::GetRenderWidgetHostViewAndroid() { |
378 RenderWidgetHostView* rwhv = NULL; | 380 RenderWidgetHostView* rwhv = NULL; |
379 if (web_contents_) { | 381 if (web_contents_) { |
380 rwhv = web_contents_->GetRenderWidgetHostView(); | 382 rwhv = web_contents_->GetRenderWidgetHostView(); |
381 if (web_contents_->ShowingInterstitialPage()) { | 383 if (web_contents_->ShowingInterstitialPage()) { |
382 rwhv = static_cast<InterstitialPageImpl*>( | 384 rwhv = static_cast<InterstitialPageImpl*>( |
383 web_contents_->GetInterstitialPage())-> | 385 web_contents_->GetInterstitialPage())-> |
(...skipping 1411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1795 reinterpret_cast<ui::ViewAndroid*>(view_android), | 1797 reinterpret_cast<ui::ViewAndroid*>(view_android), |
1796 reinterpret_cast<ui::WindowAndroid*>(window_android)); | 1798 reinterpret_cast<ui::WindowAndroid*>(window_android)); |
1797 return reinterpret_cast<intptr_t>(view); | 1799 return reinterpret_cast<intptr_t>(view); |
1798 } | 1800 } |
1799 | 1801 |
1800 bool RegisterContentViewCore(JNIEnv* env) { | 1802 bool RegisterContentViewCore(JNIEnv* env) { |
1801 return RegisterNativesImpl(env); | 1803 return RegisterNativesImpl(env); |
1802 } | 1804 } |
1803 | 1805 |
1804 } // namespace content | 1806 } // namespace content |
OLD | NEW |