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 22 matching lines...) Expand all Loading... |
33 #include "cc/surfaces/surface_id_allocator.h" | 33 #include "cc/surfaces/surface_id_allocator.h" |
34 #include "cc/surfaces/surface_manager.h" | 34 #include "cc/surfaces/surface_manager.h" |
35 #include "cc/trees/layer_tree_host.h" | 35 #include "cc/trees/layer_tree_host.h" |
36 #include "content/browser/accessibility/browser_accessibility_manager_android.h" | 36 #include "content/browser/accessibility/browser_accessibility_manager_android.h" |
37 #include "content/browser/android/composited_touch_handle_drawable.h" | 37 #include "content/browser/android/composited_touch_handle_drawable.h" |
38 #include "content/browser/android/content_view_core_impl.h" | 38 #include "content/browser/android/content_view_core_impl.h" |
39 #include "content/browser/android/edge_effect.h" | 39 #include "content/browser/android/edge_effect.h" |
40 #include "content/browser/android/edge_effect_l.h" | 40 #include "content/browser/android/edge_effect_l.h" |
41 #include "content/browser/android/in_process/synchronous_compositor_impl.h" | 41 #include "content/browser/android/in_process/synchronous_compositor_impl.h" |
42 #include "content/browser/android/overscroll_controller_android.h" | 42 #include "content/browser/android/overscroll_controller_android.h" |
| 43 #include "content/browser/android/popup_touch_handle_drawable.h" |
43 #include "content/browser/devtools/render_frame_devtools_agent_host.h" | 44 #include "content/browser/devtools/render_frame_devtools_agent_host.h" |
44 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" | 45 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" |
45 #include "content/browser/gpu/compositor_util.h" | 46 #include "content/browser/gpu/compositor_util.h" |
46 #include "content/browser/gpu/gpu_data_manager_impl.h" | 47 #include "content/browser/gpu/gpu_data_manager_impl.h" |
47 #include "content/browser/gpu/gpu_process_host_ui_shim.h" | 48 #include "content/browser/gpu/gpu_process_host_ui_shim.h" |
48 #include "content/browser/gpu/gpu_surface_tracker.h" | 49 #include "content/browser/gpu/gpu_surface_tracker.h" |
49 #include "content/browser/media/media_web_contents_observer.h" | 50 #include "content/browser/media/media_web_contents_observer.h" |
50 #include "content/browser/renderer_host/compositor_impl_android.h" | 51 #include "content/browser/renderer_host/compositor_impl_android.h" |
51 #include "content/browser/renderer_host/dip_util.h" | 52 #include "content/browser/renderer_host/dip_util.h" |
52 #include "content/browser/renderer_host/frame_metadata_util.h" | 53 #include "content/browser/renderer_host/frame_metadata_util.h" |
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1239 ResetGestureDetection(); | 1240 ResetGestureDetection(); |
1240 content_view_core_->OnSelectionEvent( | 1241 content_view_core_->OnSelectionEvent( |
1241 event, selection_controller_->GetStartPosition(), | 1242 event, selection_controller_->GetStartPosition(), |
1242 GetSelectionRect(*selection_controller_)); | 1243 GetSelectionRect(*selection_controller_)); |
1243 } | 1244 } |
1244 | 1245 |
1245 scoped_ptr<ui::TouchHandleDrawable> | 1246 scoped_ptr<ui::TouchHandleDrawable> |
1246 RenderWidgetHostViewAndroid::CreateDrawable() { | 1247 RenderWidgetHostViewAndroid::CreateDrawable() { |
1247 DCHECK(content_view_core_); | 1248 DCHECK(content_view_core_); |
1248 if (!using_browser_compositor_) | 1249 if (!using_browser_compositor_) |
1249 return content_view_core_->CreatePopupTouchHandleDrawable(); | 1250 return PopupTouchHandleDrawable::Create(content_view_core_); |
1250 | 1251 |
1251 return scoped_ptr<ui::TouchHandleDrawable>(new CompositedTouchHandleDrawable( | 1252 return scoped_ptr<ui::TouchHandleDrawable>(new CompositedTouchHandleDrawable( |
1252 content_view_core_->GetLayer().get(), | 1253 content_view_core_->GetLayer().get(), |
1253 content_view_core_->GetDpiScale(), | 1254 content_view_core_->GetDpiScale(), |
1254 // Use the activity context (instead of the application context) to ensure | 1255 // Use the activity context (instead of the application context) to ensure |
1255 // proper handle theming. | 1256 // proper handle theming. |
1256 content_view_core_->GetContext().obj())); | 1257 content_view_core_->GetContext().obj())); |
1257 } | 1258 } |
1258 | 1259 |
1259 void RenderWidgetHostViewAndroid::SynchronousCopyContents( | 1260 void RenderWidgetHostViewAndroid::SynchronousCopyContents( |
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2013 results->orientationAngle = display.RotationAsDegree(); | 2014 results->orientationAngle = display.RotationAsDegree(); |
2014 results->orientationType = | 2015 results->orientationType = |
2015 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 2016 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
2016 gfx::DeviceDisplayInfo info; | 2017 gfx::DeviceDisplayInfo info; |
2017 results->depth = info.GetBitsPerPixel(); | 2018 results->depth = info.GetBitsPerPixel(); |
2018 results->depthPerComponent = info.GetBitsPerComponent(); | 2019 results->depthPerComponent = info.GetBitsPerComponent(); |
2019 results->isMonochrome = (results->depthPerComponent == 0); | 2020 results->isMonochrome = (results->depthPerComponent == 0); |
2020 } | 2021 } |
2021 | 2022 |
2022 } // namespace content | 2023 } // namespace content |
OLD | NEW |