| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
| 10 #include "base/android/jni_array.h" | 10 #include "base/android/jni_array.h" |
| 11 #include "base/android/jni_string.h" | 11 #include "base/android/jni_string.h" |
| 12 #include "base/android/scoped_java_ref.h" | 12 #include "base/android/scoped_java_ref.h" |
| 13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/metrics/histogram.h" | 16 #include "base/metrics/histogram.h" |
| 17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
| 18 #include "base/values.h" | 18 #include "base/values.h" |
| 19 #include "cc/layers/layer.h" | 19 #include "cc/layers/layer.h" |
| 20 #include "cc/layers/layer_settings.h" |
| 20 #include "cc/layers/solid_color_layer.h" | 21 #include "cc/layers/solid_color_layer.h" |
| 21 #include "cc/output/begin_frame_args.h" | 22 #include "cc/output/begin_frame_args.h" |
| 22 #include "content/browser/accessibility/browser_accessibility_state_impl.h" | 23 #include "content/browser/accessibility/browser_accessibility_state_impl.h" |
| 23 #include "content/browser/android/gesture_event_type.h" | 24 #include "content/browser/android/gesture_event_type.h" |
| 24 #include "content/browser/android/interstitial_page_delegate_android.h" | 25 #include "content/browser/android/interstitial_page_delegate_android.h" |
| 25 #include "content/browser/android/java/gin_java_bridge_dispatcher_host.h" | 26 #include "content/browser/android/java/gin_java_bridge_dispatcher_host.h" |
| 26 #include "content/browser/android/load_url_params.h" | 27 #include "content/browser/android/load_url_params.h" |
| 27 #include "content/browser/frame_host/interstitial_page_impl.h" | 28 #include "content/browser/frame_host/interstitial_page_impl.h" |
| 28 #include "content/browser/geolocation/geolocation_service_context.h" | 29 #include "content/browser/geolocation/geolocation_service_context.h" |
| 29 #include "content/browser/media/media_web_contents_observer.h" | 30 #include "content/browser/media/media_web_contents_observer.h" |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 ContentViewCoreImpl::ContentViewCoreImpl( | 206 ContentViewCoreImpl::ContentViewCoreImpl( |
| 206 JNIEnv* env, | 207 JNIEnv* env, |
| 207 jobject obj, | 208 jobject obj, |
| 208 WebContents* web_contents, | 209 WebContents* web_contents, |
| 209 jobject view_android_delegate, | 210 jobject view_android_delegate, |
| 210 ui::WindowAndroid* window_android, | 211 ui::WindowAndroid* window_android, |
| 211 jobject java_bridge_retained_object_set) | 212 jobject java_bridge_retained_object_set) |
| 212 : WebContentsObserver(web_contents), | 213 : WebContentsObserver(web_contents), |
| 213 java_ref_(env, obj), | 214 java_ref_(env, obj), |
| 214 web_contents_(static_cast<WebContentsImpl*>(web_contents)), | 215 web_contents_(static_cast<WebContentsImpl*>(web_contents)), |
| 215 root_layer_(cc::SolidColorLayer::Create(Compositor::LayerSettings())), | 216 root_layer_(cc::SolidColorLayer::Create(cc::LayerSettings())), |
| 216 page_scale_(1), | 217 page_scale_(1), |
| 217 dpi_scale_(ui::GetScaleFactorForNativeView(this)), | 218 dpi_scale_(ui::GetScaleFactorForNativeView(this)), |
| 218 window_android_(window_android), | 219 window_android_(window_android), |
| 219 device_orientation_(0), | 220 device_orientation_(0), |
| 220 accessibility_enabled_(false) { | 221 accessibility_enabled_(false) { |
| 221 CHECK(web_contents) << | 222 CHECK(web_contents) << |
| 222 "A ContentViewCoreImpl should be created with a valid WebContents."; | 223 "A ContentViewCoreImpl should be created with a valid WebContents."; |
| 223 DCHECK(window_android_); | 224 DCHECK(window_android_); |
| 224 DCHECK(view_android_delegate); | 225 DCHECK(view_android_delegate); |
| 225 view_android_delegate_.Reset(AttachCurrentThread(), view_android_delegate); | 226 view_android_delegate_.Reset(AttachCurrentThread(), view_android_delegate); |
| (...skipping 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1521 return ScopedJavaLocalRef<jobject>(); | 1522 return ScopedJavaLocalRef<jobject>(); |
| 1522 | 1523 |
| 1523 return view->GetJavaObject(); | 1524 return view->GetJavaObject(); |
| 1524 } | 1525 } |
| 1525 | 1526 |
| 1526 bool RegisterContentViewCore(JNIEnv* env) { | 1527 bool RegisterContentViewCore(JNIEnv* env) { |
| 1527 return RegisterNativesImpl(env); | 1528 return RegisterNativesImpl(env); |
| 1528 } | 1529 } |
| 1529 | 1530 |
| 1530 } // namespace content | 1531 } // namespace content |
| OLD | NEW |