| 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 1291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1302 } else { | 1302 } else { |
| 1303 accessibility_state->ResetAccessibilityMode(); | 1303 accessibility_state->ResetAccessibilityMode(); |
| 1304 if (web_contents_) { | 1304 if (web_contents_) { |
| 1305 web_contents_->SetAccessibilityMode( | 1305 web_contents_->SetAccessibilityMode( |
| 1306 accessibility_state->accessibility_mode()); | 1306 accessibility_state->accessibility_mode()); |
| 1307 } | 1307 } |
| 1308 } | 1308 } |
| 1309 } | 1309 } |
| 1310 | 1310 |
| 1311 void ContentViewCoreImpl::SendOrientationChangeEventInternal() { | 1311 void ContentViewCoreImpl::SendOrientationChangeEventInternal() { |
| 1312 // TODO need to make ScreenOrientationListener context-based to make sure we |
| 1313 // reach this function every time the current display changes orientation |
| 1314 ui::WindowAndroid* windowAndroid = GetWindowAndroid(); |
| 1315 if (windowAndroid) |
| 1316 windowAndroid->UpdateDeviceDisplayInfo(); |
| 1317 |
| 1312 RenderWidgetHostViewAndroid* rwhv = GetRenderWidgetHostViewAndroid(); | 1318 RenderWidgetHostViewAndroid* rwhv = GetRenderWidgetHostViewAndroid(); |
| 1313 if (rwhv) | 1319 if (rwhv) |
| 1314 rwhv->UpdateScreenInfo(GetViewAndroid()); | 1320 rwhv->UpdateScreenInfo(GetViewAndroid()); |
| 1315 | 1321 |
| 1316 static_cast<WebContentsImpl*>(web_contents())-> | 1322 static_cast<WebContentsImpl*>(web_contents())-> |
| 1317 screen_orientation_dispatcher_host()->OnOrientationChange(); | 1323 screen_orientation_dispatcher_host()->OnOrientationChange(); |
| 1318 } | 1324 } |
| 1319 | 1325 |
| 1320 void ContentViewCoreImpl::ExtractSmartClipData(JNIEnv* env, | 1326 void ContentViewCoreImpl::ExtractSmartClipData(JNIEnv* env, |
| 1321 jobject obj, | 1327 jobject obj, |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1463 return NULL; | 1469 return NULL; |
| 1464 | 1470 |
| 1465 return view->GetJavaObject().Release(); | 1471 return view->GetJavaObject().Release(); |
| 1466 } | 1472 } |
| 1467 | 1473 |
| 1468 bool RegisterContentViewCore(JNIEnv* env) { | 1474 bool RegisterContentViewCore(JNIEnv* env) { |
| 1469 return RegisterNativesImpl(env); | 1475 return RegisterNativesImpl(env); |
| 1470 } | 1476 } |
| 1471 | 1477 |
| 1472 } // namespace content | 1478 } // namespace content |
| OLD | NEW |