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

Unified Diff: cc/CCScrollbarAnimationController.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/CCScrollbarAnimationController.h ('k') | cc/CCScrollbarAnimationControllerLinearFade.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/CCScrollbarAnimationController.cpp
diff --git a/cc/CCScrollbarAnimationController.cpp b/cc/CCScrollbarAnimationController.cpp
deleted file mode 100644
index 89f74cb55ead58446537318609e8c7a7b732d0df..0000000000000000000000000000000000000000
--- a/cc/CCScrollbarAnimationController.cpp
+++ /dev/null
@@ -1,97 +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 "CCScrollbarAnimationController.h"
-
-#include "CCScrollbarLayerImpl.h"
-#include <wtf/CurrentTime.h>
-
-#if OS(ANDROID)
-#include "CCScrollbarAnimationControllerLinearFade.h"
-#endif
-
-namespace cc {
-
-#if OS(ANDROID)
-PassOwnPtr<CCScrollbarAnimationController> CCScrollbarAnimationController::create(CCLayerImpl* scrollLayer)
-{
- static const double fadeoutDelay = 0.3;
- static const double fadeoutLength = 0.3;
- return CCScrollbarAnimationControllerLinearFade::create(scrollLayer, fadeoutDelay, fadeoutLength);
-}
-#else
-PassOwnPtr<CCScrollbarAnimationController> CCScrollbarAnimationController::create(CCLayerImpl* scrollLayer)
-{
- return adoptPtr(new CCScrollbarAnimationController(scrollLayer));
-}
-#endif
-
-CCScrollbarAnimationController::CCScrollbarAnimationController(CCLayerImpl* scrollLayer)
- : m_horizontalScrollbarLayer(0)
- , m_verticalScrollbarLayer(0)
-{
- CCScrollbarAnimationController::updateScrollOffsetAtTime(scrollLayer, 0);
-}
-
-CCScrollbarAnimationController::~CCScrollbarAnimationController()
-{
-}
-
-bool CCScrollbarAnimationController::animate(double)
-{
- return false;
-}
-
-void CCScrollbarAnimationController::didPinchGestureBegin()
-{
- didPinchGestureBeginAtTime(monotonicallyIncreasingTime());
-}
-
-void CCScrollbarAnimationController::didPinchGestureUpdate()
-{
- didPinchGestureUpdateAtTime(monotonicallyIncreasingTime());
-}
-
-void CCScrollbarAnimationController::didPinchGestureEnd()
-{
- didPinchGestureEndAtTime(monotonicallyIncreasingTime());
-}
-
-void CCScrollbarAnimationController::updateScrollOffset(CCLayerImpl* scrollLayer)
-{
- updateScrollOffsetAtTime(scrollLayer, monotonicallyIncreasingTime());
-}
-
-IntSize CCScrollbarAnimationController::getScrollLayerBounds(const CCLayerImpl* scrollLayer)
-{
- if (!scrollLayer->children().size())
- return IntSize();
- // Copy & paste from CCLayerTreeHostImpl...
- // FIXME: Hardcoding the first child here is weird. Think of
- // a cleaner way to get the contentBounds on the Impl side.
- return scrollLayer->children()[0]->bounds();
-}
-
-void CCScrollbarAnimationController::updateScrollOffsetAtTime(CCLayerImpl* scrollLayer, double)
-{
- m_currentPos = scrollLayer->scrollPosition() + scrollLayer->scrollDelta();
- m_totalSize = getScrollLayerBounds(scrollLayer);
- m_maximum = scrollLayer->maxScrollPosition();
-
- if (m_horizontalScrollbarLayer) {
- m_horizontalScrollbarLayer->setCurrentPos(m_currentPos.x());
- m_horizontalScrollbarLayer->setTotalSize(m_totalSize.width());
- m_horizontalScrollbarLayer->setMaximum(m_maximum.width());
- }
-
- if (m_verticalScrollbarLayer) {
- m_verticalScrollbarLayer->setCurrentPos(m_currentPos.y());
- m_verticalScrollbarLayer->setTotalSize(m_totalSize.height());
- m_verticalScrollbarLayer->setMaximum(m_maximum.height());
- }
-}
-
-} // namespace cc
« no previous file with comments | « cc/CCScrollbarAnimationController.h ('k') | cc/CCScrollbarAnimationControllerLinearFade.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698