| OLD | NEW |
| 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 #ifndef CCScrollbarLayerImpl_h | 5 #ifndef CCScrollbarLayerImpl_h |
| 6 #define CCScrollbarLayerImpl_h | 6 #define CCScrollbarLayerImpl_h |
| 7 | 7 |
| 8 #if USE(ACCELERATED_COMPOSITING) | 8 #if USE(ACCELERATED_COMPOSITING) |
| 9 | 9 |
| 10 #include "CCLayerImpl.h" | 10 #include "CCLayerImpl.h" |
| 11 #include "CCScrollbarGeometryFixedThumb.h" | 11 #include "CCScrollbarGeometryFixedThumb.h" |
| 12 #include <public/WebRect.h> | 12 #include <public/WebRect.h> |
| 13 #include <public/WebScrollbar.h> | 13 #include <public/WebScrollbar.h> |
| 14 #include <public/WebVector.h> | 14 #include <public/WebVector.h> |
| 15 | 15 |
| 16 namespace cc { | 16 namespace cc { |
| 17 | 17 |
| 18 class ScrollView; | 18 class ScrollView; |
| 19 | 19 |
| 20 class CCScrollbarLayerImpl : public CCLayerImpl { | 20 class CCScrollbarLayerImpl : public CCLayerImpl { |
| 21 public: | 21 public: |
| 22 static PassOwnPtr<CCScrollbarLayerImpl> create(int id); | 22 static PassOwnPtr<CCScrollbarLayerImpl> create(int id); |
| 23 virtual ~CCScrollbarLayerImpl(); |
| 23 | 24 |
| 24 CCScrollbarGeometryFixedThumb* scrollbarGeometry() const { return m_geometry
.get(); } | 25 CCScrollbarGeometryFixedThumb* scrollbarGeometry() const { return m_geometry
.get(); } |
| 25 void setScrollbarGeometry(PassOwnPtr<CCScrollbarGeometryFixedThumb>); | 26 void setScrollbarGeometry(PassOwnPtr<CCScrollbarGeometryFixedThumb>); |
| 26 void setScrollbarData(WebKit::WebScrollbar*); | 27 void setScrollbarData(WebKit::WebScrollbar*); |
| 27 | 28 |
| 28 void setBackTrackResourceId(CCResourceProvider::ResourceId id) { m_backTrack
ResourceId = id; } | 29 void setBackTrackResourceId(CCResourceProvider::ResourceId id) { m_backTrack
ResourceId = id; } |
| 29 void setForeTrackResourceId(CCResourceProvider::ResourceId id) { m_foreTrack
ResourceId = id; } | 30 void setForeTrackResourceId(CCResourceProvider::ResourceId id) { m_foreTrack
ResourceId = id; } |
| 30 void setThumbResourceId(CCResourceProvider::ResourceId id) { m_thumbResource
Id = id; } | 31 void setThumbResourceId(CCResourceProvider::ResourceId id) { m_thumbResource
Id = id; } |
| 31 | 32 |
| 32 float currentPos() const { return m_currentPos; } | 33 float currentPos() const { return m_currentPos; } |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 virtual WebScrollbar::ScrollbarPart hoveredPart() const; | 70 virtual WebScrollbar::ScrollbarPart hoveredPart() const; |
| 70 virtual WebScrollbar::ScrollbarOverlayStyle scrollbarOverlayStyle() cons
t; | 71 virtual WebScrollbar::ScrollbarOverlayStyle scrollbarOverlayStyle() cons
t; |
| 71 virtual WebScrollbar::Orientation orientation() const; | 72 virtual WebScrollbar::Orientation orientation() const; |
| 72 virtual bool isCustomScrollbar() const; | 73 virtual bool isCustomScrollbar() const; |
| 73 | 74 |
| 74 private: | 75 private: |
| 75 CCScrollbarLayerImpl* m_owner; | 76 CCScrollbarLayerImpl* m_owner; |
| 76 | 77 |
| 77 }; | 78 }; |
| 78 | 79 |
| 80 virtual const char* layerTypeAsString() const OVERRIDE; |
| 81 |
| 79 CCScrollbar m_scrollbar; | 82 CCScrollbar m_scrollbar; |
| 80 | 83 |
| 81 CCResourceProvider::ResourceId m_backTrackResourceId; | 84 CCResourceProvider::ResourceId m_backTrackResourceId; |
| 82 CCResourceProvider::ResourceId m_foreTrackResourceId; | 85 CCResourceProvider::ResourceId m_foreTrackResourceId; |
| 83 CCResourceProvider::ResourceId m_thumbResourceId; | 86 CCResourceProvider::ResourceId m_thumbResourceId; |
| 84 | 87 |
| 85 OwnPtr<CCScrollbarGeometryFixedThumb> m_geometry; | 88 OwnPtr<CCScrollbarGeometryFixedThumb> m_geometry; |
| 86 | 89 |
| 87 // Data to implement CCScrollbar | 90 // Data to implement CCScrollbar |
| 88 WebKit::WebScrollbar::ScrollbarOverlayStyle m_scrollbarOverlayStyle; | 91 WebKit::WebScrollbar::ScrollbarOverlayStyle m_scrollbarOverlayStyle; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 100 bool m_isScrollViewScrollbar; | 103 bool m_isScrollViewScrollbar; |
| 101 bool m_enabled; | 104 bool m_enabled; |
| 102 bool m_isCustomScrollbar; | 105 bool m_isCustomScrollbar; |
| 103 bool m_isOverlayScrollbar; | 106 bool m_isOverlayScrollbar; |
| 104 }; | 107 }; |
| 105 | 108 |
| 106 } | 109 } |
| 107 #endif // USE(ACCELERATED_COMPOSITING) | 110 #endif // USE(ACCELERATED_COMPOSITING) |
| 108 | 111 |
| 109 #endif | 112 #endif |
| OLD | NEW |