OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 IntSize WebScrollbarThemeClientImpl::size() const { | 58 IntSize WebScrollbarThemeClientImpl::size() const { |
59 return scrollbar_.size(); | 59 return scrollbar_.size(); |
60 } | 60 } |
61 | 61 |
62 IntPoint WebScrollbarThemeClientImpl::Location() const { | 62 IntPoint WebScrollbarThemeClientImpl::Location() const { |
63 return scrollbar_.Location(); | 63 return scrollbar_.Location(); |
64 } | 64 } |
65 | 65 |
66 FrameViewBase* WebScrollbarThemeClientImpl::Parent() const { | 66 FrameViewBase* WebScrollbarThemeClientImpl::Parent() const { |
67 // Unused by Chromium scrollbar themes. | 67 // Unused by Chromium scrollbar themes. |
68 ASSERT_NOT_REACHED(); | 68 NOTREACHED(); |
69 return 0; | 69 return 0; |
70 } | 70 } |
71 | 71 |
72 FrameViewBase* WebScrollbarThemeClientImpl::Root() const { | 72 FrameViewBase* WebScrollbarThemeClientImpl::Root() const { |
73 // Unused by Chromium scrollbar themes. | 73 // Unused by Chromium scrollbar themes. |
74 ASSERT_NOT_REACHED(); | 74 NOTREACHED(); |
75 return 0; | 75 return 0; |
76 } | 76 } |
77 | 77 |
78 void WebScrollbarThemeClientImpl::SetFrameRect(const IntRect&) { | 78 void WebScrollbarThemeClientImpl::SetFrameRect(const IntRect&) { |
79 // Unused by Chromium scrollbar themes. | 79 // Unused by Chromium scrollbar themes. |
80 ASSERT_NOT_REACHED(); | 80 NOTREACHED(); |
81 } | 81 } |
82 | 82 |
83 IntRect WebScrollbarThemeClientImpl::FrameRect() const { | 83 IntRect WebScrollbarThemeClientImpl::FrameRect() const { |
84 return IntRect(Location(), size()); | 84 return IntRect(Location(), size()); |
85 } | 85 } |
86 | 86 |
87 void WebScrollbarThemeClientImpl::Invalidate() { | 87 void WebScrollbarThemeClientImpl::Invalidate() { |
88 // Unused by Chromium scrollbar themes. | 88 // Unused by Chromium scrollbar themes. |
89 ASSERT_NOT_REACHED(); | 89 NOTREACHED(); |
90 } | 90 } |
91 | 91 |
92 void WebScrollbarThemeClientImpl::InvalidateRect(const IntRect&) { | 92 void WebScrollbarThemeClientImpl::InvalidateRect(const IntRect&) { |
93 // Unused by Chromium scrollbar themes. | 93 // Unused by Chromium scrollbar themes. |
94 ASSERT_NOT_REACHED(); | 94 NOTREACHED(); |
95 } | 95 } |
96 | 96 |
97 ScrollbarOverlayColorTheme | 97 ScrollbarOverlayColorTheme |
98 WebScrollbarThemeClientImpl::GetScrollbarOverlayColorTheme() const { | 98 WebScrollbarThemeClientImpl::GetScrollbarOverlayColorTheme() const { |
99 return static_cast<ScrollbarOverlayColorTheme>( | 99 return static_cast<ScrollbarOverlayColorTheme>( |
100 scrollbar_.ScrollbarOverlayColorTheme()); | 100 scrollbar_.ScrollbarOverlayColorTheme()); |
101 } | 101 } |
102 | 102 |
103 void WebScrollbarThemeClientImpl::GetTickmarks( | 103 void WebScrollbarThemeClientImpl::GetTickmarks( |
104 Vector<IntRect>& tickmarks) const { | 104 Vector<IntRect>& tickmarks) const { |
105 WebVector<WebRect> web_tickmarks; | 105 WebVector<WebRect> web_tickmarks; |
106 scrollbar_.GetTickmarks(web_tickmarks); | 106 scrollbar_.GetTickmarks(web_tickmarks); |
107 tickmarks.Resize(web_tickmarks.size()); | 107 tickmarks.Resize(web_tickmarks.size()); |
108 for (size_t i = 0; i < web_tickmarks.size(); ++i) | 108 for (size_t i = 0; i < web_tickmarks.size(); ++i) |
109 tickmarks[i] = web_tickmarks[i]; | 109 tickmarks[i] = web_tickmarks[i]; |
110 } | 110 } |
111 | 111 |
112 bool WebScrollbarThemeClientImpl::IsScrollableAreaActive() const { | 112 bool WebScrollbarThemeClientImpl::IsScrollableAreaActive() const { |
113 return scrollbar_.IsScrollableAreaActive(); | 113 return scrollbar_.IsScrollableAreaActive(); |
114 } | 114 } |
115 | 115 |
116 IntPoint WebScrollbarThemeClientImpl::ConvertFromRootFrame( | 116 IntPoint WebScrollbarThemeClientImpl::ConvertFromRootFrame( |
117 const IntPoint& point_in_root_frame) const { | 117 const IntPoint& point_in_root_frame) const { |
118 // Unused by Chromium scrollbar themes. | 118 // Unused by Chromium scrollbar themes. |
119 ASSERT_NOT_REACHED(); | 119 NOTREACHED(); |
120 return point_in_root_frame; | 120 return point_in_root_frame; |
121 } | 121 } |
122 | 122 |
123 bool WebScrollbarThemeClientImpl::IsCustomScrollbar() const { | 123 bool WebScrollbarThemeClientImpl::IsCustomScrollbar() const { |
124 return scrollbar_.IsCustomScrollbar(); | 124 return scrollbar_.IsCustomScrollbar(); |
125 } | 125 } |
126 | 126 |
127 ScrollbarOrientation WebScrollbarThemeClientImpl::Orientation() const { | 127 ScrollbarOrientation WebScrollbarThemeClientImpl::Orientation() const { |
128 return static_cast<ScrollbarOrientation>(scrollbar_.GetOrientation()); | 128 return static_cast<ScrollbarOrientation>(scrollbar_.GetOrientation()); |
129 } | 129 } |
(...skipping 28 matching lines...) Expand all Loading... |
158 | 158 |
159 ScrollbarPart WebScrollbarThemeClientImpl::PressedPart() const { | 159 ScrollbarPart WebScrollbarThemeClientImpl::PressedPart() const { |
160 return static_cast<ScrollbarPart>(scrollbar_.PressedPart()); | 160 return static_cast<ScrollbarPart>(scrollbar_.PressedPart()); |
161 } | 161 } |
162 | 162 |
163 ScrollbarPart WebScrollbarThemeClientImpl::HoveredPart() const { | 163 ScrollbarPart WebScrollbarThemeClientImpl::HoveredPart() const { |
164 return static_cast<ScrollbarPart>(scrollbar_.HoveredPart()); | 164 return static_cast<ScrollbarPart>(scrollbar_.HoveredPart()); |
165 } | 165 } |
166 | 166 |
167 void WebScrollbarThemeClientImpl::StyleChanged() { | 167 void WebScrollbarThemeClientImpl::StyleChanged() { |
168 ASSERT_NOT_REACHED(); | 168 NOTREACHED(); |
169 } | 169 } |
170 | 170 |
171 void WebScrollbarThemeClientImpl::SetScrollbarsHidden(bool hidden) { | 171 void WebScrollbarThemeClientImpl::SetScrollbarsHidden(bool hidden) { |
172 ASSERT_NOT_REACHED(); | 172 NOTREACHED(); |
173 } | 173 } |
174 | 174 |
175 bool WebScrollbarThemeClientImpl::Enabled() const { | 175 bool WebScrollbarThemeClientImpl::Enabled() const { |
176 return scrollbar_.Enabled(); | 176 return scrollbar_.Enabled(); |
177 } | 177 } |
178 | 178 |
179 void WebScrollbarThemeClientImpl::SetEnabled(bool) { | 179 void WebScrollbarThemeClientImpl::SetEnabled(bool) { |
180 ASSERT_NOT_REACHED(); | 180 NOTREACHED(); |
181 } | 181 } |
182 | 182 |
183 bool WebScrollbarThemeClientImpl::IsOverlayScrollbar() const { | 183 bool WebScrollbarThemeClientImpl::IsOverlayScrollbar() const { |
184 return scrollbar_.IsOverlay(); | 184 return scrollbar_.IsOverlay(); |
185 } | 185 } |
186 | 186 |
187 float WebScrollbarThemeClientImpl::ElasticOverscroll() const { | 187 float WebScrollbarThemeClientImpl::ElasticOverscroll() const { |
188 return scrollbar_.ElasticOverscroll(); | 188 return scrollbar_.ElasticOverscroll(); |
189 } | 189 } |
190 | 190 |
191 void WebScrollbarThemeClientImpl::SetElasticOverscroll( | 191 void WebScrollbarThemeClientImpl::SetElasticOverscroll( |
192 float elastic_overscroll) { | 192 float elastic_overscroll) { |
193 return scrollbar_.SetElasticOverscroll(elastic_overscroll); | 193 return scrollbar_.SetElasticOverscroll(elastic_overscroll); |
194 } | 194 } |
195 | 195 |
196 } // namespace blink | 196 } // namespace blink |
OLD | NEW |