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

Side by Side Diff: Source/core/platform/mac/ScrollbarThemeMacNonOverlayAPI.h

Issue 21108004: Separate ScrollbarThemeMac into separate files (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@second_refactor
Patch Set: Incorporate review feedback Created 7 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 10 matching lines...) Expand all
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef Animation_h 31 #ifndef ScrollbarThemeMacNonOverlayAPI_h
32 #define Animation_h 32 #define ScrollbarThemeMacNonOverlayAPI_h
33 33
34 #include "core/animation/AnimationEffect.h" 34 #include "core/platform/mac/ScrollbarThemeMac.h"
35 #include "core/animation/TimedItem.h"
36 #include "wtf/RefPtr.h"
37 35
38 namespace WebCore { 36 namespace WebCore {
39 37
40 class Element; 38 class ScrollbarThemeMacNonOverlayAPI : public ScrollbarThemeMacCommon {
39 public:
40 virtual int scrollbarThickness(ScrollbarControlSize = RegularScrollbar);
41 virtual bool usesOverlayScrollbars() const { return false; }
42 virtual ScrollbarButtonsPlacement buttonsPlacement() const;
41 43
42 class Animation FINAL : public TimedItem { 44 virtual bool paint(ScrollbarThemeClient*, GraphicsContext*, const IntRect& d amageRect);
43
44 public:
45 static PassRefPtr<Animation> create(PassRefPtr<Element>, PassRefPtr<Animatio nEffect>, const Timing&);
46
47 const AnimationEffect::CompositableValueMap* compositableValues() const
48 {
49 ASSERT(m_compositableValues);
50 return m_compositableValues.get();
51 }
52 45
53 protected: 46 protected:
54 virtual void applyEffects(bool previouslyInEffect); 47 virtual IntRect trackRect(ScrollbarThemeClient*, bool painting = false);
55 virtual void clearEffects(); 48 virtual IntRect backButtonRect(ScrollbarThemeClient*, ScrollbarPart, bool pa inting = false);
56 virtual void updateChildrenAndEffects(bool) const OVERRIDE FINAL; 49 virtual IntRect forwardButtonRect(ScrollbarThemeClient*, ScrollbarPart, bool painting = false);
57 virtual void willDetach() OVERRIDE FINAL;
58 50
59 private: 51 virtual void updateButtonPlacement();
60 Animation(PassRefPtr<Element>, PassRefPtr<AnimationEffect>, const Timing&);
61 52
62 RefPtr<Element> m_target; 53 virtual bool hasButtons(ScrollbarThemeClient*);
63 RefPtr<AnimationEffect> m_effect; 54 virtual bool hasThumb(ScrollbarThemeClient*);
64 55
65 bool m_activeInAnimationStack; 56 virtual int minimumThumbLength(ScrollbarThemeClient*);
66 OwnPtr<AnimationEffect::CompositableValueMap> m_compositableValues;
67 }; 57 };
68 58
69 } // namespace WebCore 59 }
70 60
71 #endif 61 #endif
OLDNEW
« no previous file with comments | « Source/core/platform/mac/ScrollbarThemeMac.mm ('k') | Source/core/platform/mac/ScrollbarThemeMacNonOverlayAPI.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698