| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CC_LAYERS_PAINTED_SCROLLBAR_LAYER_H_ | 5 #ifndef CC_LAYERS_PAINTED_SCROLLBAR_LAYER_H_ |
| 6 #define CC_LAYERS_PAINTED_SCROLLBAR_LAYER_H_ | 6 #define CC_LAYERS_PAINTED_SCROLLBAR_LAYER_H_ |
| 7 | 7 |
| 8 #include "cc/base/cc_export.h" | 8 #include "cc/base/cc_export.h" |
| 9 #include "cc/input/scrollbar.h" | 9 #include "cc/input/scrollbar.h" |
| 10 #include "cc/layers/contents_scaling_layer.h" | 10 #include "cc/layers/contents_scaling_layer.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 } | 61 } |
| 62 void UpdateThumbAndTrackGeometry(); | 62 void UpdateThumbAndTrackGeometry(); |
| 63 | 63 |
| 64 private: | 64 private: |
| 65 gfx::Rect ScrollbarLayerRectToContentRect(gfx::Rect layer_rect) const; | 65 gfx::Rect ScrollbarLayerRectToContentRect(gfx::Rect layer_rect) const; |
| 66 gfx::Rect OriginThumbRect() const; | 66 gfx::Rect OriginThumbRect() const; |
| 67 | 67 |
| 68 int MaxTextureSize(); | 68 int MaxTextureSize(); |
| 69 float ClampScaleToMaxTextureSize(float scale); | 69 float ClampScaleToMaxTextureSize(float scale); |
| 70 | 70 |
| 71 UIResourceBitmap RasterizeScrollbarPart(gfx::Rect rect, | 71 scoped_refptr<UIResourceBitmap> RasterizeScrollbarPart(gfx::Rect rect, |
| 72 ScrollbarPart part); | 72 ScrollbarPart part); |
| 73 | 73 |
| 74 scoped_ptr<Scrollbar> scrollbar_; | 74 scoped_ptr<Scrollbar> scrollbar_; |
| 75 int scroll_layer_id_; | 75 int scroll_layer_id_; |
| 76 | 76 |
| 77 // Snapshot of properties taken in UpdateThumbAndTrackGeometry and used in | 77 // Snapshot of properties taken in UpdateThumbAndTrackGeometry and used in |
| 78 // PushPropertiesTo. | 78 // PushPropertiesTo. |
| 79 int thumb_thickness_; | 79 int thumb_thickness_; |
| 80 int thumb_length_; | 80 int thumb_length_; |
| 81 gfx::Point location_; | 81 gfx::Point location_; |
| 82 gfx::Rect track_rect_; | 82 gfx::Rect track_rect_; |
| 83 | 83 |
| 84 scoped_ptr<ScopedUIResource> track_resource_; | 84 scoped_ptr<ScopedUIResource> track_resource_; |
| 85 scoped_ptr<ScopedUIResource> thumb_resource_; | 85 scoped_ptr<ScopedUIResource> thumb_resource_; |
| 86 | 86 |
| 87 DISALLOW_COPY_AND_ASSIGN(PaintedScrollbarLayer); | 87 DISALLOW_COPY_AND_ASSIGN(PaintedScrollbarLayer); |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 } // namespace cc | 90 } // namespace cc |
| 91 | 91 |
| 92 #endif // CC_LAYERS_PAINTED_SCROLLBAR_LAYER_H_ | 92 #endif // CC_LAYERS_PAINTED_SCROLLBAR_LAYER_H_ |
| OLD | NEW |