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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 int touch_slop_pixels = gfx::ViewConfiguration::GetTouchSlopInPixels(); | 286 int touch_slop_pixels = gfx::ViewConfiguration::GetTouchSlopInPixels(); |
287 bool show_on_tap_for_empty_editable = false; | 287 bool show_on_tap_for_empty_editable = false; |
288 return make_scoped_ptr(new ui::TouchSelectionController( | 288 return make_scoped_ptr(new ui::TouchSelectionController( |
289 client, | 289 client, |
290 base::TimeDelta::FromMilliseconds(tap_timeout_ms), | 290 base::TimeDelta::FromMilliseconds(tap_timeout_ms), |
291 touch_slop_pixels / content_view_core->GetDpiScale(), | 291 touch_slop_pixels / content_view_core->GetDpiScale(), |
292 show_on_tap_for_empty_editable)); | 292 show_on_tap_for_empty_editable)); |
293 } | 293 } |
294 | 294 |
295 scoped_ptr<OverscrollControllerAndroid> CreateOverscrollController( | 295 scoped_ptr<OverscrollControllerAndroid> CreateOverscrollController( |
296 ContentViewCore* content_view_core) { | 296 ContentViewCoreImpl* content_view_core) { |
297 DCHECK(content_view_core); | 297 return make_scoped_ptr(new OverscrollControllerAndroid(content_view_core)); |
298 ui::WindowAndroid* window = content_view_core->GetWindowAndroid(); | |
299 DCHECK(window); | |
300 ui::WindowAndroidCompositor* compositor = window->GetCompositor(); | |
301 DCHECK(compositor); | |
302 return make_scoped_ptr(new OverscrollControllerAndroid( | |
303 content_view_core->GetWebContents(), | |
304 compositor, | |
305 content_view_core->GetDpiScale())); | |
306 } | 298 } |
307 | 299 |
308 ui::GestureProvider::Config CreateGestureProviderConfig() { | 300 ui::GestureProvider::Config CreateGestureProviderConfig() { |
309 ui::GestureProvider::Config config = ui::GetGestureProviderConfig( | 301 ui::GestureProvider::Config config = ui::GetGestureProviderConfig( |
310 ui::GestureProviderConfigType::CURRENT_PLATFORM); | 302 ui::GestureProviderConfigType::CURRENT_PLATFORM); |
311 config.disable_click_delay = | 303 config.disable_click_delay = |
312 base::CommandLine::ForCurrentProcess()->HasSwitch( | 304 base::CommandLine::ForCurrentProcess()->HasSwitch( |
313 switches::kDisableClickDelay); | 305 switches::kDisableClickDelay); |
314 return config; | 306 return config; |
315 } | 307 } |
(...skipping 1808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2124 results->orientationAngle = display.RotationAsDegree(); | 2116 results->orientationAngle = display.RotationAsDegree(); |
2125 results->orientationType = | 2117 results->orientationType = |
2126 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 2118 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
2127 gfx::DeviceDisplayInfo info; | 2119 gfx::DeviceDisplayInfo info; |
2128 results->depth = info.GetBitsPerPixel(); | 2120 results->depth = info.GetBitsPerPixel(); |
2129 results->depthPerComponent = info.GetBitsPerComponent(); | 2121 results->depthPerComponent = info.GetBitsPerComponent(); |
2130 results->isMonochrome = (results->depthPerComponent == 0); | 2122 results->isMonochrome = (results->depthPerComponent == 0); |
2131 } | 2123 } |
2132 | 2124 |
2133 } // namespace content | 2125 } // namespace content |
OLD | NEW |