| 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/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 switches::kDisableGestureRequirementForMediaFullscreen); | 598 switches::kDisableGestureRequirementForMediaFullscreen); |
| 599 #endif | 599 #endif |
| 600 | 600 |
| 601 prefs.touch_enabled = ui::AreTouchEventsEnabled(); | 601 prefs.touch_enabled = ui::AreTouchEventsEnabled(); |
| 602 prefs.device_supports_touch = prefs.touch_enabled && | 602 prefs.device_supports_touch = prefs.touch_enabled && |
| 603 ui::IsTouchDevicePresent(); | 603 ui::IsTouchDevicePresent(); |
| 604 #if defined(OS_ANDROID) | 604 #if defined(OS_ANDROID) |
| 605 prefs.device_supports_mouse = false; | 605 prefs.device_supports_mouse = false; |
| 606 #endif | 606 #endif |
| 607 | 607 |
| 608 prefs.pointer_events_max_touch_points = ui::MaxTouchPoints(); |
| 609 |
| 608 prefs.touch_adjustment_enabled = | 610 prefs.touch_adjustment_enabled = |
| 609 !command_line.HasSwitch(switches::kDisableTouchAdjustment); | 611 !command_line.HasSwitch(switches::kDisableTouchAdjustment); |
| 610 prefs.compositor_touch_hit_testing = | 612 prefs.compositor_touch_hit_testing = |
| 611 !command_line.HasSwitch(cc::switches::kDisableCompositorTouchHitTesting); | 613 !command_line.HasSwitch(cc::switches::kDisableCompositorTouchHitTesting); |
| 612 | 614 |
| 613 #if defined(OS_MACOSX) || defined(OS_CHROMEOS) | 615 #if defined(OS_MACOSX) || defined(OS_CHROMEOS) |
| 614 bool default_enable_scroll_animator = true; | 616 bool default_enable_scroll_animator = true; |
| 615 #else | 617 #else |
| 616 bool default_enable_scroll_animator = false; | 618 bool default_enable_scroll_animator = false; |
| 617 #endif | 619 #endif |
| (...skipping 3224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3842 } | 3844 } |
| 3843 | 3845 |
| 3844 void WebContentsImpl::OnFrameRemoved( | 3846 void WebContentsImpl::OnFrameRemoved( |
| 3845 RenderViewHostImpl* render_view_host, | 3847 RenderViewHostImpl* render_view_host, |
| 3846 int64 frame_id) { | 3848 int64 frame_id) { |
| 3847 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 3849 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 3848 FrameDetached(render_view_host, frame_id)); | 3850 FrameDetached(render_view_host, frame_id)); |
| 3849 } | 3851 } |
| 3850 | 3852 |
| 3851 } // namespace content | 3853 } // namespace content |
| OLD | NEW |