Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(421)

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 26764002: Chromium side of maxTouchPoints implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't need WebRuntimeFeatures any more Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 switches::kDisableGestureRequirementForMediaFullscreen); 579 switches::kDisableGestureRequirementForMediaFullscreen);
580 #endif 580 #endif
581 581
582 prefs.touch_enabled = ui::AreTouchEventsEnabled(); 582 prefs.touch_enabled = ui::AreTouchEventsEnabled();
583 prefs.device_supports_touch = prefs.touch_enabled && 583 prefs.device_supports_touch = prefs.touch_enabled &&
584 ui::IsTouchDevicePresent(); 584 ui::IsTouchDevicePresent();
585 #if defined(OS_ANDROID) 585 #if defined(OS_ANDROID)
586 prefs.device_supports_mouse = false; 586 prefs.device_supports_mouse = false;
587 #endif 587 #endif
588 588
589 prefs.pointer_events_max_touch_points = ui::MaxTouchPoints();
590
589 prefs.touch_adjustment_enabled = 591 prefs.touch_adjustment_enabled =
590 !command_line.HasSwitch(switches::kDisableTouchAdjustment); 592 !command_line.HasSwitch(switches::kDisableTouchAdjustment);
591 prefs.compositor_touch_hit_testing = 593 prefs.compositor_touch_hit_testing =
592 !command_line.HasSwitch(cc::switches::kDisableCompositorTouchHitTesting); 594 !command_line.HasSwitch(cc::switches::kDisableCompositorTouchHitTesting);
593 595
594 #if defined(OS_MACOSX) || defined(OS_CHROMEOS) 596 #if defined(OS_MACOSX) || defined(OS_CHROMEOS)
595 bool default_enable_scroll_animator = true; 597 bool default_enable_scroll_animator = true;
596 #else 598 #else
597 bool default_enable_scroll_animator = false; 599 bool default_enable_scroll_animator = false;
598 #endif 600 #endif
(...skipping 3213 matching lines...) Expand 10 before | Expand all | Expand 10 after
3812 } 3814 }
3813 3815
3814 void WebContentsImpl::OnFrameRemoved( 3816 void WebContentsImpl::OnFrameRemoved(
3815 RenderViewHostImpl* render_view_host, 3817 RenderViewHostImpl* render_view_host,
3816 int64 frame_id) { 3818 int64 frame_id) {
3817 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 3819 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
3818 FrameDetached(render_view_host, frame_id)); 3820 FrameDetached(render_view_host, frame_id));
3819 } 3821 }
3820 3822
3821 } // namespace content 3823 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698