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

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: Incorporate review feedback from sadrul 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
« no previous file with comments | « AUTHORS ('k') | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 =
darin (slow to review) 2013/10/25 20:00:55 could you by chance also fix the indentation of th
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
618 prefs.enable_scroll_animator = default_enable_scroll_animator; 620 prefs.enable_scroll_animator = default_enable_scroll_animator;
(...skipping 3223 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « AUTHORS ('k') | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698