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

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: fix up nearby whitespace as darin requested Created 7 years, 1 month 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 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 switches::kDisableGestureRequirementForMediaFullscreen); 604 switches::kDisableGestureRequirementForMediaFullscreen);
605 #endif 605 #endif
606 606
607 prefs.touch_enabled = ui::AreTouchEventsEnabled(); 607 prefs.touch_enabled = ui::AreTouchEventsEnabled();
608 prefs.device_supports_touch = prefs.touch_enabled && 608 prefs.device_supports_touch = prefs.touch_enabled &&
609 ui::IsTouchDevicePresent(); 609 ui::IsTouchDevicePresent();
610 #if defined(OS_ANDROID) 610 #if defined(OS_ANDROID)
611 prefs.device_supports_mouse = false; 611 prefs.device_supports_mouse = false;
612 #endif 612 #endif
613 613
614 prefs.touch_adjustment_enabled = 614 prefs.pointer_events_max_touch_points = ui::MaxTouchPoints();
615 !command_line.HasSwitch(switches::kDisableTouchAdjustment); 615
616 prefs.compositor_touch_hit_testing = 616 prefs.touch_adjustment_enabled =
617 !command_line.HasSwitch(cc::switches::kDisableCompositorTouchHitTesting); 617 !command_line.HasSwitch(switches::kDisableTouchAdjustment);
618 prefs.compositor_touch_hit_testing =
619 !command_line.HasSwitch(cc::switches::kDisableCompositorTouchHitTesting);
618 620
619 #if defined(OS_MACOSX) || defined(OS_CHROMEOS) 621 #if defined(OS_MACOSX) || defined(OS_CHROMEOS)
620 bool default_enable_scroll_animator = true; 622 bool default_enable_scroll_animator = true;
621 #else 623 #else
622 bool default_enable_scroll_animator = false; 624 bool default_enable_scroll_animator = false;
623 #endif 625 #endif
624 prefs.enable_scroll_animator = default_enable_scroll_animator; 626 prefs.enable_scroll_animator = default_enable_scroll_animator;
625 if (command_line.HasSwitch(switches::kEnableSmoothScrolling)) 627 if (command_line.HasSwitch(switches::kEnableSmoothScrolling))
626 prefs.enable_scroll_animator = true; 628 prefs.enable_scroll_animator = true;
627 if (command_line.HasSwitch(switches::kDisableSmoothScrolling)) 629 if (command_line.HasSwitch(switches::kDisableSmoothScrolling))
(...skipping 3233 matching lines...) Expand 10 before | Expand all | Expand 10 after
3861 } 3863 }
3862 3864
3863 void WebContentsImpl::OnFrameRemoved( 3865 void WebContentsImpl::OnFrameRemoved(
3864 RenderViewHostImpl* render_view_host, 3866 RenderViewHostImpl* render_view_host,
3865 int64 frame_id) { 3867 int64 frame_id) {
3866 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 3868 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
3867 FrameDetached(render_view_host, frame_id)); 3869 FrameDetached(render_view_host, frame_id));
3868 } 3870 }
3869 3871
3870 } // namespace content 3872 } // 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