| 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/build_info.h" | 9 #include "base/android/build_info.h" |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #include "cc/output/viewport_selection_bound.h" | 28 #include "cc/output/viewport_selection_bound.h" |
| 29 #include "cc/resources/single_release_callback.h" | 29 #include "cc/resources/single_release_callback.h" |
| 30 #include "cc/trees/layer_tree_host.h" | 30 #include "cc/trees/layer_tree_host.h" |
| 31 #include "content/browser/accessibility/browser_accessibility_manager_android.h" | 31 #include "content/browser/accessibility/browser_accessibility_manager_android.h" |
| 32 #include "content/browser/android/composited_touch_handle_drawable.h" | 32 #include "content/browser/android/composited_touch_handle_drawable.h" |
| 33 #include "content/browser/android/content_view_core_impl.h" | 33 #include "content/browser/android/content_view_core_impl.h" |
| 34 #include "content/browser/android/edge_effect.h" | 34 #include "content/browser/android/edge_effect.h" |
| 35 #include "content/browser/android/edge_effect_l.h" | 35 #include "content/browser/android/edge_effect_l.h" |
| 36 #include "content/browser/android/in_process/synchronous_compositor_impl.h" | 36 #include "content/browser/android/in_process/synchronous_compositor_impl.h" |
| 37 #include "content/browser/android/overscroll_controller_android.h" | 37 #include "content/browser/android/overscroll_controller_android.h" |
| 38 #include "content/browser/devtools/render_view_devtools_agent_host.h" | 38 #include "content/browser/devtools/render_frame_devtools_agent_host.h" |
| 39 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" | 39 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" |
| 40 #include "content/browser/gpu/compositor_util.h" | 40 #include "content/browser/gpu/compositor_util.h" |
| 41 #include "content/browser/gpu/gpu_data_manager_impl.h" | 41 #include "content/browser/gpu/gpu_data_manager_impl.h" |
| 42 #include "content/browser/gpu/gpu_process_host_ui_shim.h" | 42 #include "content/browser/gpu/gpu_process_host_ui_shim.h" |
| 43 #include "content/browser/gpu/gpu_surface_tracker.h" | 43 #include "content/browser/gpu/gpu_surface_tracker.h" |
| 44 #include "content/browser/media/media_web_contents_observer.h" | 44 #include "content/browser/media/media_web_contents_observer.h" |
| 45 #include "content/browser/renderer_host/compositor_impl_android.h" | 45 #include "content/browser/renderer_host/compositor_impl_android.h" |
| 46 #include "content/browser/renderer_host/dip_util.h" | 46 #include "content/browser/renderer_host/dip_util.h" |
| 47 #include "content/browser/renderer_host/frame_metadata_util.h" | 47 #include "content/browser/renderer_host/frame_metadata_util.h" |
| 48 #include "content/browser/renderer_host/input/synthetic_gesture_target_android.h
" | 48 #include "content/browser/renderer_host/input/synthetic_gesture_target_android.h
" |
| (...skipping 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1194 ComputeContentsSize(frame_metadata); | 1194 ComputeContentsSize(frame_metadata); |
| 1195 | 1195 |
| 1196 // DevTools ScreenCast support for Android WebView. | 1196 // DevTools ScreenCast support for Android WebView. |
| 1197 WebContents* web_contents = content_view_core_->GetWebContents(); | 1197 WebContents* web_contents = content_view_core_->GetWebContents(); |
| 1198 if (DevToolsAgentHost::HasFor(web_contents)) { | 1198 if (DevToolsAgentHost::HasFor(web_contents)) { |
| 1199 scoped_refptr<DevToolsAgentHost> dtah = | 1199 scoped_refptr<DevToolsAgentHost> dtah = |
| 1200 DevToolsAgentHost::GetOrCreateFor(web_contents); | 1200 DevToolsAgentHost::GetOrCreateFor(web_contents); |
| 1201 // Unblock the compositor. | 1201 // Unblock the compositor. |
| 1202 BrowserThread::PostTask( | 1202 BrowserThread::PostTask( |
| 1203 BrowserThread::UI, FROM_HERE, | 1203 BrowserThread::UI, FROM_HERE, |
| 1204 base::Bind(&RenderViewDevToolsAgentHost::SynchronousSwapCompositorFrame, | 1204 base::Bind( |
| 1205 static_cast<RenderViewDevToolsAgentHost*>(dtah.get()), | 1205 &RenderFrameDevToolsAgentHost::SynchronousSwapCompositorFrame, |
| 1206 frame_metadata)); | 1206 static_cast<RenderFrameDevToolsAgentHost*>(dtah.get()), |
| 1207 frame_metadata)); |
| 1207 } | 1208 } |
| 1208 } | 1209 } |
| 1209 | 1210 |
| 1210 void RenderWidgetHostViewAndroid::SetOverlayVideoMode(bool enabled) { | 1211 void RenderWidgetHostViewAndroid::SetOverlayVideoMode(bool enabled) { |
| 1211 if (layer_.get()) | 1212 if (layer_.get()) |
| 1212 layer_->SetContentsOpaque(!enabled); | 1213 layer_->SetContentsOpaque(!enabled); |
| 1213 } | 1214 } |
| 1214 | 1215 |
| 1215 bool RenderWidgetHostViewAndroid::SupportsAnimation() const { | 1216 bool RenderWidgetHostViewAndroid::SupportsAnimation() const { |
| 1216 // The synchronous (WebView) compositor does not have a proper browser | 1217 // The synchronous (WebView) compositor does not have a proper browser |
| (...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1911 results->orientationAngle = display.RotationAsDegree(); | 1912 results->orientationAngle = display.RotationAsDegree(); |
| 1912 results->orientationType = | 1913 results->orientationType = |
| 1913 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 1914 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
| 1914 gfx::DeviceDisplayInfo info; | 1915 gfx::DeviceDisplayInfo info; |
| 1915 results->depth = info.GetBitsPerPixel(); | 1916 results->depth = info.GetBitsPerPixel(); |
| 1916 results->depthPerComponent = info.GetBitsPerComponent(); | 1917 results->depthPerComponent = info.GetBitsPerComponent(); |
| 1917 results->isMonochrome = (results->depthPerComponent == 0); | 1918 results->isMonochrome = (results->depthPerComponent == 0); |
| 1918 } | 1919 } |
| 1919 | 1920 |
| 1920 } // namespace content | 1921 } // namespace content |
| OLD | NEW |