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

Side by Side Diff: Source/core/page/EventHandler.cpp

Issue 112023010: Make EventHandler::ActiveIntervalTimer mockable. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Naming change Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/page/EventHandler.h ('k') | Source/core/testing/Internals.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 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies)
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 2720 matching lines...) Expand 10 before | Expand all | Expand 10 after
2731 2731
2732 IntRect touchRect(touchCenter - touchRadius, touchRadius + touchRadius); 2732 IntRect touchRect(touchCenter - touchRadius, touchRadius + touchRadius);
2733 Vector<RefPtr<Node>, 11> nodes; 2733 Vector<RefPtr<Node>, 11> nodes;
2734 copyToVector(result.rectBasedTestResult(), nodes); 2734 copyToVector(result.rectBasedTestResult(), nodes);
2735 2735
2736 // FIXME: the explicit Vector conversion copies into a temporary and is 2736 // FIXME: the explicit Vector conversion copies into a temporary and is
2737 // wasteful. 2737 // wasteful.
2738 return findBestZoomableArea(targetNode, targetArea, touchCenter, touchRect, Vector<RefPtr<Node> >(nodes)); 2738 return findBestZoomableArea(targetNode, targetArea, touchCenter, touchRect, Vector<RefPtr<Node> >(nodes));
2739 } 2739 }
2740 2740
2741 MockableTimer<EventHandler>* EventHandler::activeIntervalTimerForTesting()
2742 {
2743 return &m_activeIntervalTimer;
2744 }
2745
2741 bool EventHandler::adjustGesturePosition(const PlatformGestureEvent& gestureEven t, IntPoint& adjustedPoint) 2746 bool EventHandler::adjustGesturePosition(const PlatformGestureEvent& gestureEven t, IntPoint& adjustedPoint)
2742 { 2747 {
2743 if (!shouldApplyTouchAdjustment(gestureEvent)) 2748 if (!shouldApplyTouchAdjustment(gestureEvent))
2744 return false; 2749 return false;
2745 2750
2746 Node* targetNode = 0; 2751 Node* targetNode = 0;
2747 switch (gestureEvent.type()) { 2752 switch (gestureEvent.type()) {
2748 case PlatformEvent::GestureTap: 2753 case PlatformEvent::GestureTap:
2749 case PlatformEvent::GestureTapUnconfirmed: 2754 case PlatformEvent::GestureTapUnconfirmed:
2750 case PlatformEvent::GestureTapDown: 2755 case PlatformEvent::GestureTapDown:
(...skipping 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after
4024 unsigned EventHandler::accessKeyModifiers() 4029 unsigned EventHandler::accessKeyModifiers()
4025 { 4030 {
4026 #if OS(MACOSX) 4031 #if OS(MACOSX)
4027 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; 4032 return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
4028 #else 4033 #else
4029 return PlatformEvent::AltKey; 4034 return PlatformEvent::AltKey;
4030 #endif 4035 #endif
4031 } 4036 }
4032 4037
4033 } // namespace WebCore 4038 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/EventHandler.h ('k') | Source/core/testing/Internals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698