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

Side by Side Diff: cc/scrollbar_animation_controller.cc

Issue 11138029: cc: Remove wtf includes from layer_impl.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix android build 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/scrollbar_animation_controller.h ('k') | cc/scrollbar_animation_controller_linear_fade.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "config.h" 5 #include "config.h"
6 6
7 #include "CCScrollbarAnimationController.h" 7 #include "CCScrollbarAnimationController.h"
8 8
9 #include "CCScrollbarLayerImpl.h" 9 #include "CCScrollbarLayerImpl.h"
10 #include <wtf/CurrentTime.h> 10 #include <wtf/CurrentTime.h>
11 11
12 #if OS(ANDROID) 12 #if OS(ANDROID)
13 #include "CCScrollbarAnimationControllerLinearFade.h" 13 #include "CCScrollbarAnimationControllerLinearFade.h"
14 #endif 14 #endif
15 15
16 namespace cc { 16 namespace cc {
17 17
18 #if OS(ANDROID) 18 #if OS(ANDROID)
19 PassOwnPtr<CCScrollbarAnimationController> CCScrollbarAnimationController::creat e(CCLayerImpl* scrollLayer) 19 scoped_ptr<CCScrollbarAnimationController> CCScrollbarAnimationController::creat e(CCLayerImpl* scrollLayer)
20 { 20 {
21 static const double fadeoutDelay = 0.3; 21 static const double fadeoutDelay = 0.3;
22 static const double fadeoutLength = 0.3; 22 static const double fadeoutLength = 0.3;
23 return CCScrollbarAnimationControllerLinearFade::create(scrollLayer, fadeout Delay, fadeoutLength); 23 return CCScrollbarAnimationControllerLinearFade::create(scrollLayer, fadeout Delay, fadeoutLength).PassAs<CCScrollbarAnimationController>();
24 } 24 }
25 #else 25 #else
26 PassOwnPtr<CCScrollbarAnimationController> CCScrollbarAnimationController::creat e(CCLayerImpl* scrollLayer) 26 scoped_ptr<CCScrollbarAnimationController> CCScrollbarAnimationController::creat e(CCLayerImpl* scrollLayer)
27 { 27 {
28 return adoptPtr(new CCScrollbarAnimationController(scrollLayer)); 28 return make_scoped_ptr(new CCScrollbarAnimationController(scrollLayer));
29 } 29 }
30 #endif 30 #endif
31 31
32 CCScrollbarAnimationController::CCScrollbarAnimationController(CCLayerImpl* scro llLayer) 32 CCScrollbarAnimationController::CCScrollbarAnimationController(CCLayerImpl* scro llLayer)
33 : m_horizontalScrollbarLayer(0) 33 : m_horizontalScrollbarLayer(0)
34 , m_verticalScrollbarLayer(0) 34 , m_verticalScrollbarLayer(0)
35 { 35 {
36 CCScrollbarAnimationController::updateScrollOffsetAtTime(scrollLayer, 0); 36 CCScrollbarAnimationController::updateScrollOffsetAtTime(scrollLayer, 0);
37 } 37 }
38 38
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } 88 }
89 89
90 if (m_verticalScrollbarLayer) { 90 if (m_verticalScrollbarLayer) {
91 m_verticalScrollbarLayer->setCurrentPos(m_currentPos.y()); 91 m_verticalScrollbarLayer->setCurrentPos(m_currentPos.y());
92 m_verticalScrollbarLayer->setTotalSize(m_totalSize.height()); 92 m_verticalScrollbarLayer->setTotalSize(m_totalSize.height());
93 m_verticalScrollbarLayer->setMaximum(m_maximum.height()); 93 m_verticalScrollbarLayer->setMaximum(m_maximum.height());
94 } 94 }
95 } 95 }
96 96
97 } // namespace cc 97 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scrollbar_animation_controller.h ('k') | cc/scrollbar_animation_controller_linear_fade.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698