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 DCHECK_NE(event.type, WebInputEvent::Undefined) | |
jdduke (slow)
2014/04/03 22:03:28
Hmm, I think your change to CreateWebGestureEventF
tdresser
2014/04/04 16:39:31
Done.
| |
374 } | 375 } |
375 | 376 |
376 RenderWidgetHostViewAndroid* | 377 RenderWidgetHostViewAndroid* |
377 ContentViewCoreImpl::GetRenderWidgetHostViewAndroid() { | 378 ContentViewCoreImpl::GetRenderWidgetHostViewAndroid() { |
378 RenderWidgetHostView* rwhv = NULL; | 379 RenderWidgetHostView* rwhv = NULL; |
379 if (web_contents_) { | 380 if (web_contents_) { |
380 rwhv = web_contents_->GetRenderWidgetHostView(); | 381 rwhv = web_contents_->GetRenderWidgetHostView(); |
381 if (web_contents_->ShowingInterstitialPage()) { | 382 if (web_contents_->ShowingInterstitialPage()) { |
382 rwhv = static_cast<InterstitialPageImpl*>( | 383 rwhv = static_cast<InterstitialPageImpl*>( |
383 web_contents_->GetInterstitialPage())-> | 384 web_contents_->GetInterstitialPage())-> |
(...skipping 1411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1795 reinterpret_cast<ui::ViewAndroid*>(view_android), | 1796 reinterpret_cast<ui::ViewAndroid*>(view_android), |
1796 reinterpret_cast<ui::WindowAndroid*>(window_android)); | 1797 reinterpret_cast<ui::WindowAndroid*>(window_android)); |
1797 return reinterpret_cast<intptr_t>(view); | 1798 return reinterpret_cast<intptr_t>(view); |
1798 } | 1799 } |
1799 | 1800 |
1800 bool RegisterContentViewCore(JNIEnv* env) { | 1801 bool RegisterContentViewCore(JNIEnv* env) { |
1801 return RegisterNativesImpl(env); | 1802 return RegisterNativesImpl(env); |
1802 } | 1803 } |
1803 | 1804 |
1804 } // namespace content | 1805 } // namespace content |
OLD | NEW |