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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 13 matching lines...) Expand all Loading... |
24 | 24 |
25 #include "config.h" | 25 #include "config.h" |
26 | 26 |
27 #include "platform/exported/WebScrollbarImpl.h" | 27 #include "platform/exported/WebScrollbarImpl.h" |
28 | 28 |
29 #include "platform/geometry/IntRect.h" | 29 #include "platform/geometry/IntRect.h" |
30 #include "platform/scroll/Scrollbar.h" | 30 #include "platform/scroll/Scrollbar.h" |
31 | 31 |
32 namespace blink { | 32 namespace blink { |
33 | 33 |
34 WebScrollbarImpl::WebScrollbarImpl(blink::Scrollbar* scrollbar) | 34 WebScrollbarImpl::WebScrollbarImpl(Scrollbar* scrollbar) |
35 : m_scrollbar(scrollbar) | 35 : m_scrollbar(scrollbar) |
36 { | 36 { |
37 } | 37 } |
38 | 38 |
39 bool WebScrollbarImpl::isOverlay() const | 39 bool WebScrollbarImpl::isOverlay() const |
40 { | 40 { |
41 return m_scrollbar->isOverlayScrollbar(); | 41 return m_scrollbar->isOverlayScrollbar(); |
42 } | 42 } |
43 | 43 |
44 int WebScrollbarImpl::value() const | 44 int WebScrollbarImpl::value() const |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 return m_scrollbar->isScrollViewScrollbar(); | 76 return m_scrollbar->isScrollViewScrollbar(); |
77 } | 77 } |
78 | 78 |
79 bool WebScrollbarImpl::isScrollableAreaActive() const | 79 bool WebScrollbarImpl::isScrollableAreaActive() const |
80 { | 80 { |
81 return m_scrollbar->isScrollableAreaActive(); | 81 return m_scrollbar->isScrollableAreaActive(); |
82 } | 82 } |
83 | 83 |
84 void WebScrollbarImpl::getTickmarks(WebVector<WebRect>& webTickmarks) const | 84 void WebScrollbarImpl::getTickmarks(WebVector<WebRect>& webTickmarks) const |
85 { | 85 { |
86 Vector<blink::IntRect> tickmarks; | 86 Vector<IntRect> tickmarks; |
87 m_scrollbar->getTickmarks(tickmarks); | 87 m_scrollbar->getTickmarks(tickmarks); |
88 | 88 |
89 WebVector<WebRect> result(tickmarks.size()); | 89 WebVector<WebRect> result(tickmarks.size()); |
90 for (size_t i = 0; i < tickmarks.size(); ++i) | 90 for (size_t i = 0; i < tickmarks.size(); ++i) |
91 result[i] = tickmarks[i]; | 91 result[i] = tickmarks[i]; |
92 | 92 |
93 webTickmarks.swap(result); | 93 webTickmarks.swap(result); |
94 } | 94 } |
95 | 95 |
96 WebScrollbar::ScrollbarControlSize WebScrollbarImpl::controlSize() const | 96 WebScrollbar::ScrollbarControlSize WebScrollbarImpl::controlSize() const |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 { | 132 { |
133 return m_scrollbar->isAlphaLocked(); | 133 return m_scrollbar->isAlphaLocked(); |
134 } | 134 } |
135 | 135 |
136 void WebScrollbarImpl::setIsAlphaLocked(bool flag) | 136 void WebScrollbarImpl::setIsAlphaLocked(bool flag) |
137 { | 137 { |
138 m_scrollbar->setIsAlphaLocked(flag); | 138 m_scrollbar->setIsAlphaLocked(flag); |
139 } | 139 } |
140 | 140 |
141 } // namespace blink | 141 } // namespace blink |
OLD | NEW |