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

Unified Diff: cc/CCScrollbarAnimationControllerLinearFade.cpp

Issue 11122003: [cc] Rename all cc/ filenames to Chromium style (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/CCScrollbarAnimationControllerLinearFade.h ('k') | cc/CCScrollbarGeometryFixedThumb.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/CCScrollbarAnimationControllerLinearFade.cpp
diff --git a/cc/CCScrollbarAnimationControllerLinearFade.cpp b/cc/CCScrollbarAnimationControllerLinearFade.cpp
deleted file mode 100644
index 95ad1984bda86759a1ea5042d19bae285fdfecbb..0000000000000000000000000000000000000000
--- a/cc/CCScrollbarAnimationControllerLinearFade.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "config.h"
-
-#include "CCScrollbarAnimationControllerLinearFade.h"
-
-#include "CCScrollbarLayerImpl.h"
-
-namespace cc {
-
-PassOwnPtr<CCScrollbarAnimationControllerLinearFade> CCScrollbarAnimationControllerLinearFade::create(CCLayerImpl* scrollLayer, double fadeoutDelay, double fadeoutLength)
-{
- return adoptPtr(new CCScrollbarAnimationControllerLinearFade(scrollLayer, fadeoutDelay, fadeoutLength));
-}
-
-CCScrollbarAnimationControllerLinearFade::CCScrollbarAnimationControllerLinearFade(CCLayerImpl* scrollLayer, double fadeoutDelay, double fadeoutLength)
- : CCScrollbarAnimationController(scrollLayer)
- , m_lastAwakenTime(-100000000) // arbitrary invalid timestamp
- , m_pinchGestureInEffect(false)
- , m_fadeoutDelay(fadeoutDelay)
- , m_fadeoutLength(fadeoutLength)
-{
-}
-
-CCScrollbarAnimationControllerLinearFade::~CCScrollbarAnimationControllerLinearFade()
-{
-}
-
-bool CCScrollbarAnimationControllerLinearFade::animate(double monotonicTime)
-{
- float opacity = opacityAtTime(monotonicTime);
- if (horizontalScrollbarLayer())
- horizontalScrollbarLayer()->setOpacity(opacity);
- if (verticalScrollbarLayer())
- verticalScrollbarLayer()->setOpacity(opacity);
- return opacity;
-}
-
-void CCScrollbarAnimationControllerLinearFade::didPinchGestureUpdateAtTime(double)
-{
- m_pinchGestureInEffect = true;
-}
-
-void CCScrollbarAnimationControllerLinearFade::didPinchGestureEndAtTime(double monotonicTime)
-{
- m_pinchGestureInEffect = false;
- m_lastAwakenTime = monotonicTime;
-}
-
-void CCScrollbarAnimationControllerLinearFade::updateScrollOffsetAtTime(CCLayerImpl* scrollLayer, double monotonicTime)
-{
- FloatPoint previousPos = currentPos();
- CCScrollbarAnimationController::updateScrollOffsetAtTime(scrollLayer, monotonicTime);
-
- if (previousPos == currentPos())
- return;
-
- m_lastAwakenTime = monotonicTime;
-}
-
-float CCScrollbarAnimationControllerLinearFade::opacityAtTime(double monotonicTime)
-{
- if (m_pinchGestureInEffect)
- return 1;
-
- double delta = monotonicTime - m_lastAwakenTime;
-
- if (delta <= m_fadeoutDelay)
- return 1;
- if (delta < m_fadeoutDelay + m_fadeoutLength)
- return (m_fadeoutDelay + m_fadeoutLength - delta) / m_fadeoutLength;
- return 0;
-}
-
-} // namespace cc
« no previous file with comments | « cc/CCScrollbarAnimationControllerLinearFade.h ('k') | cc/CCScrollbarGeometryFixedThumb.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698