| 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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 jobject obj, | 216 jobject obj, |
| 217 WebContents* web_contents, | 217 WebContents* web_contents, |
| 218 jobject view_android_delegate, | 218 jobject view_android_delegate, |
| 219 ui::WindowAndroid* window_android, | 219 ui::WindowAndroid* window_android, |
| 220 jobject java_bridge_retained_object_set) | 220 jobject java_bridge_retained_object_set) |
| 221 : WebContentsObserver(web_contents), | 221 : WebContentsObserver(web_contents), |
| 222 java_ref_(env, obj), | 222 java_ref_(env, obj), |
| 223 web_contents_(static_cast<WebContentsImpl*>(web_contents)), | 223 web_contents_(static_cast<WebContentsImpl*>(web_contents)), |
| 224 root_layer_(cc::SolidColorLayer::Create()), | 224 root_layer_(cc::SolidColorLayer::Create()), |
| 225 dpi_scale_(GetPrimaryDisplayDeviceScaleFactor()), | 225 dpi_scale_(GetPrimaryDisplayDeviceScaleFactor()), |
| 226 page_scale_(1), | |
| 227 view_android_(new ui::ViewAndroid(view_android_delegate, window_android)), | 226 view_android_(new ui::ViewAndroid(view_android_delegate, window_android)), |
| 228 window_android_(window_android), | 227 window_android_(window_android), |
| 229 device_orientation_(0), | 228 device_orientation_(0), |
| 230 accessibility_enabled_(false) { | 229 accessibility_enabled_(false) { |
| 231 CHECK(web_contents) << | 230 CHECK(web_contents) << |
| 232 "A ContentViewCoreImpl should be created with a valid WebContents."; | 231 "A ContentViewCoreImpl should be created with a valid WebContents."; |
| 233 DCHECK(window_android_); | 232 DCHECK(window_android_); |
| 234 | 233 |
| 235 root_layer_->SetBackgroundColor(GetBackgroundColor(env, obj)); | 234 root_layer_->SetBackgroundColor(GetBackgroundColor(env, obj)); |
| 236 gfx::Size physical_size( | 235 gfx::Size physical_size( |
| (...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1476 return NULL; | 1475 return NULL; |
| 1477 | 1476 |
| 1478 return view->GetJavaObject().Release(); | 1477 return view->GetJavaObject().Release(); |
| 1479 } | 1478 } |
| 1480 | 1479 |
| 1481 bool RegisterContentViewCore(JNIEnv* env) { | 1480 bool RegisterContentViewCore(JNIEnv* env) { |
| 1482 return RegisterNativesImpl(env); | 1481 return RegisterNativesImpl(env); |
| 1483 } | 1482 } |
| 1484 | 1483 |
| 1485 } // namespace content | 1484 } // namespace content |
| OLD | NEW |