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 | 5 |
6 #ifndef ScrollbarLayerChromium_h | 6 #ifndef ScrollbarLayerChromium_h |
7 #define ScrollbarLayerChromium_h | 7 #define ScrollbarLayerChromium_h |
8 | 8 |
9 #include "cc/caching_bitmap_content_layer_updater.h" | 9 #include "cc/caching_bitmap_content_layer_updater.h" |
10 #include "cc/contents_scaling_layer.h" | 10 #include "cc/contents_scaling_layer.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 int scrollLayerId() const { return m_scrollLayerId; } | 33 int scrollLayerId() const { return m_scrollLayerId; } |
34 void setScrollLayerId(int id) { m_scrollLayerId = id; } | 34 void setScrollLayerId(int id) { m_scrollLayerId = id; } |
35 | 35 |
36 virtual ScrollbarLayer* toScrollbarLayer() OVERRIDE; | 36 virtual ScrollbarLayer* toScrollbarLayer() OVERRIDE; |
37 | 37 |
38 protected: | 38 protected: |
39 ScrollbarLayer(scoped_ptr<WebKit::WebScrollbar>, WebKit::WebScrollbarThemePa
inter, scoped_ptr<WebKit::WebScrollbarThemeGeometry>, int scrollLayerId); | 39 ScrollbarLayer(scoped_ptr<WebKit::WebScrollbar>, WebKit::WebScrollbarThemePa
inter, scoped_ptr<WebKit::WebScrollbarThemeGeometry>, int scrollLayerId); |
40 virtual ~ScrollbarLayer(); | 40 virtual ~ScrollbarLayer(); |
41 | 41 |
42 private: | 42 private: |
43 void updatePart(CachingBitmapContentLayerUpdater*, LayerUpdater::Resource*,
const IntRect&, ResourceUpdateQueue&, RenderingStats&); | 43 void updatePart(CachingBitmapContentLayerUpdater*, LayerUpdater::Resource*,
const gfx::Rect&, ResourceUpdateQueue&, RenderingStats&); |
44 void createUpdaterIfNeeded(); | 44 void createUpdaterIfNeeded(); |
45 IntRect scrollbarLayerRectToContentRect(const WebKit::WebRect& layerRect) co
nst; | 45 gfx::Rect scrollbarLayerRectToContentRect(const gfx::Rect& layerRect) const; |
46 | 46 |
47 scoped_ptr<WebKit::WebScrollbar> m_scrollbar; | 47 scoped_ptr<WebKit::WebScrollbar> m_scrollbar; |
48 WebKit::WebScrollbarThemePainter m_painter; | 48 WebKit::WebScrollbarThemePainter m_painter; |
49 scoped_ptr<WebKit::WebScrollbarThemeGeometry> m_geometry; | 49 scoped_ptr<WebKit::WebScrollbarThemeGeometry> m_geometry; |
50 int m_scrollLayerId; | 50 int m_scrollLayerId; |
51 | 51 |
52 GLenum m_textureFormat; | 52 GLenum m_textureFormat; |
53 | 53 |
54 scoped_refptr<CachingBitmapContentLayerUpdater> m_backTrackUpdater; | 54 scoped_refptr<CachingBitmapContentLayerUpdater> m_backTrackUpdater; |
55 scoped_refptr<CachingBitmapContentLayerUpdater> m_foreTrackUpdater; | 55 scoped_refptr<CachingBitmapContentLayerUpdater> m_foreTrackUpdater; |
56 scoped_refptr<CachingBitmapContentLayerUpdater> m_thumbUpdater; | 56 scoped_refptr<CachingBitmapContentLayerUpdater> m_thumbUpdater; |
57 | 57 |
58 // All the parts of the scrollbar except the thumb | 58 // All the parts of the scrollbar except the thumb |
59 scoped_ptr<LayerUpdater::Resource> m_backTrack; | 59 scoped_ptr<LayerUpdater::Resource> m_backTrack; |
60 scoped_ptr<LayerUpdater::Resource> m_foreTrack; | 60 scoped_ptr<LayerUpdater::Resource> m_foreTrack; |
61 scoped_ptr<LayerUpdater::Resource> m_thumb; | 61 scoped_ptr<LayerUpdater::Resource> m_thumb; |
62 }; | 62 }; |
63 | 63 |
64 } | 64 } |
65 #endif | 65 #endif |
OLD | NEW |