OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/renderer_host/render_widget_host_view_android.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_android.h" |
6 | 6 |
7 #include <android/bitmap.h> | 7 #include <android/bitmap.h> |
8 | 8 |
9 #include "base/android/sys_utils.h" | 9 #include "base/android/sys_utils.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1159 if (compositor) | 1159 if (compositor) |
1160 return compositor->HandleInputEvent(input_event); | 1160 return compositor->HandleInputEvent(input_event); |
1161 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; | 1161 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; |
1162 } | 1162 } |
1163 | 1163 |
1164 void RenderWidgetHostViewAndroid::OnSetNeedsFlushInput() { | 1164 void RenderWidgetHostViewAndroid::OnSetNeedsFlushInput() { |
1165 if (flush_input_requested_ || !content_view_core_) | 1165 if (flush_input_requested_ || !content_view_core_) |
1166 return; | 1166 return; |
1167 TRACE_EVENT0("input", "RenderWidgetHostViewAndroid::OnSetNeedsFlushInput"); | 1167 TRACE_EVENT0("input", "RenderWidgetHostViewAndroid::OnSetNeedsFlushInput"); |
1168 flush_input_requested_ = true; | 1168 flush_input_requested_ = true; |
| 1169 content_view_core_->GetWindowAndroid()->RequestVSyncUpdate(); |
1169 } | 1170 } |
1170 | 1171 |
1171 void RenderWidgetHostViewAndroid::CreateBrowserAccessibilityManagerIfNeeded() { | 1172 void RenderWidgetHostViewAndroid::CreateBrowserAccessibilityManagerIfNeeded() { |
1172 if (!host_ || host_->accessibility_mode() != AccessibilityModeComplete) | 1173 if (!host_ || host_->accessibility_mode() != AccessibilityModeComplete) |
1173 return; | 1174 return; |
1174 | 1175 |
1175 if (!GetBrowserAccessibilityManager()) { | 1176 if (!GetBrowserAccessibilityManager()) { |
1176 base::android::ScopedJavaLocalRef<jobject> obj; | 1177 base::android::ScopedJavaLocalRef<jobject> obj; |
1177 if (content_view_core_) | 1178 if (content_view_core_) |
1178 obj = content_view_core_->GetJavaObject(); | 1179 obj = content_view_core_->GetJavaObject(); |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1456 results->availableRect = display.work_area(); | 1457 results->availableRect = display.work_area(); |
1457 results->deviceScaleFactor = display.device_scale_factor(); | 1458 results->deviceScaleFactor = display.device_scale_factor(); |
1458 results->orientationAngle = display.RotationAsDegree(); | 1459 results->orientationAngle = display.RotationAsDegree(); |
1459 gfx::DeviceDisplayInfo info; | 1460 gfx::DeviceDisplayInfo info; |
1460 results->depth = info.GetBitsPerPixel(); | 1461 results->depth = info.GetBitsPerPixel(); |
1461 results->depthPerComponent = info.GetBitsPerComponent(); | 1462 results->depthPerComponent = info.GetBitsPerComponent(); |
1462 results->isMonochrome = (results->depthPerComponent == 0); | 1463 results->isMonochrome = (results->depthPerComponent == 0); |
1463 } | 1464 } |
1464 | 1465 |
1465 } // namespace content | 1466 } // namespace content |
OLD | NEW |