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" | |
21 #include "cc/layers/solid_color_layer.h" | 20 #include "cc/layers/solid_color_layer.h" |
22 #include "cc/output/begin_frame_args.h" | 21 #include "cc/output/begin_frame_args.h" |
23 #include "cc/output/viewport_selection_bound.h" | 22 #include "cc/output/viewport_selection_bound.h" |
24 #include "content/browser/accessibility/browser_accessibility_state_impl.h" | 23 #include "content/browser/accessibility/browser_accessibility_state_impl.h" |
25 #include "content/browser/android/gesture_event_type.h" | 24 #include "content/browser/android/gesture_event_type.h" |
26 #include "content/browser/android/interstitial_page_delegate_android.h" | 25 #include "content/browser/android/interstitial_page_delegate_android.h" |
27 #include "content/browser/android/java/gin_java_bridge_dispatcher_host.h" | 26 #include "content/browser/android/java/gin_java_bridge_dispatcher_host.h" |
28 #include "content/browser/android/load_url_params.h" | 27 #include "content/browser/android/load_url_params.h" |
29 #include "content/browser/frame_host/interstitial_page_impl.h" | 28 #include "content/browser/frame_host/interstitial_page_impl.h" |
30 #include "content/browser/geolocation/geolocation_service_context.h" | 29 #include "content/browser/geolocation/geolocation_service_context.h" |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 ContentViewCoreImpl::ContentViewCoreImpl( | 207 ContentViewCoreImpl::ContentViewCoreImpl( |
209 JNIEnv* env, | 208 JNIEnv* env, |
210 jobject obj, | 209 jobject obj, |
211 WebContents* web_contents, | 210 WebContents* web_contents, |
212 jobject view_android_delegate, | 211 jobject view_android_delegate, |
213 ui::WindowAndroid* window_android, | 212 ui::WindowAndroid* window_android, |
214 jobject java_bridge_retained_object_set) | 213 jobject java_bridge_retained_object_set) |
215 : WebContentsObserver(web_contents), | 214 : WebContentsObserver(web_contents), |
216 java_ref_(env, obj), | 215 java_ref_(env, obj), |
217 web_contents_(static_cast<WebContentsImpl*>(web_contents)), | 216 web_contents_(static_cast<WebContentsImpl*>(web_contents)), |
218 root_layer_(cc::SolidColorLayer::Create(cc::LayerSettings())), | 217 root_layer_(cc::SolidColorLayer::Create()), |
219 page_scale_(1), | 218 page_scale_(1), |
220 dpi_scale_(ui::GetScaleFactorForNativeView(this)), | 219 dpi_scale_(ui::GetScaleFactorForNativeView(this)), |
221 window_android_(window_android), | 220 window_android_(window_android), |
222 device_orientation_(0), | 221 device_orientation_(0), |
223 accessibility_enabled_(false) { | 222 accessibility_enabled_(false) { |
224 CHECK(web_contents) << | 223 CHECK(web_contents) << |
225 "A ContentViewCoreImpl should be created with a valid WebContents."; | 224 "A ContentViewCoreImpl should be created with a valid WebContents."; |
226 DCHECK(window_android_); | 225 DCHECK(window_android_); |
227 DCHECK(view_android_delegate); | 226 DCHECK(view_android_delegate); |
228 view_android_delegate_.Reset(AttachCurrentThread(), view_android_delegate); | 227 view_android_delegate_.Reset(AttachCurrentThread(), view_android_delegate); |
(...skipping 1331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1560 return ScopedJavaLocalRef<jobject>(); | 1559 return ScopedJavaLocalRef<jobject>(); |
1561 | 1560 |
1562 return view->GetJavaObject(); | 1561 return view->GetJavaObject(); |
1563 } | 1562 } |
1564 | 1563 |
1565 bool RegisterContentViewCore(JNIEnv* env) { | 1564 bool RegisterContentViewCore(JNIEnv* env) { |
1566 return RegisterNativesImpl(env); | 1565 return RegisterNativesImpl(env); |
1567 } | 1566 } |
1568 | 1567 |
1569 } // namespace content | 1568 } // namespace content |
OLD | NEW |