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 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 | 588 |
589 prefs.touch_enabled = ui::AreTouchEventsEnabled(); | 589 prefs.touch_enabled = ui::AreTouchEventsEnabled(); |
590 prefs.device_supports_touch = prefs.touch_enabled && | 590 prefs.device_supports_touch = prefs.touch_enabled && |
591 ui::IsTouchDevicePresent(); | 591 ui::IsTouchDevicePresent(); |
592 #if defined(OS_ANDROID) | 592 #if defined(OS_ANDROID) |
593 prefs.device_supports_mouse = false; | 593 prefs.device_supports_mouse = false; |
594 #endif | 594 #endif |
595 | 595 |
596 prefs.touch_adjustment_enabled = | 596 prefs.touch_adjustment_enabled = |
597 !command_line.HasSwitch(switches::kDisableTouchAdjustment); | 597 !command_line.HasSwitch(switches::kDisableTouchAdjustment); |
| 598 prefs.compositor_touch_hit_testing = |
| 599 !command_line.HasSwitch(cc::switches::kDisableCompositorTouchHitTesting); |
598 | 600 |
599 #if defined(OS_MACOSX) || defined(OS_CHROMEOS) | 601 #if defined(OS_MACOSX) || defined(OS_CHROMEOS) |
600 bool default_enable_scroll_animator = true; | 602 bool default_enable_scroll_animator = true; |
601 #else | 603 #else |
602 bool default_enable_scroll_animator = false; | 604 bool default_enable_scroll_animator = false; |
603 #endif | 605 #endif |
604 prefs.enable_scroll_animator = default_enable_scroll_animator; | 606 prefs.enable_scroll_animator = default_enable_scroll_animator; |
605 if (command_line.HasSwitch(switches::kEnableSmoothScrolling)) | 607 if (command_line.HasSwitch(switches::kEnableSmoothScrolling)) |
606 prefs.enable_scroll_animator = true; | 608 prefs.enable_scroll_animator = true; |
607 if (command_line.HasSwitch(switches::kDisableSmoothScrolling)) | 609 if (command_line.HasSwitch(switches::kDisableSmoothScrolling)) |
(...skipping 3209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3817 } | 3819 } |
3818 | 3820 |
3819 void WebContentsImpl::OnFrameRemoved( | 3821 void WebContentsImpl::OnFrameRemoved( |
3820 RenderViewHostImpl* render_view_host, | 3822 RenderViewHostImpl* render_view_host, |
3821 int64 frame_id) { | 3823 int64 frame_id) { |
3822 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 3824 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
3823 FrameDetached(render_view_host, frame_id)); | 3825 FrameDetached(render_view_host, frame_id)); |
3824 } | 3826 } |
3825 | 3827 |
3826 } // namespace content | 3828 } // namespace content |
OLD | NEW |