| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006 Apple Computer, 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 |
| 11 * documentation and/or other materials provided with the distribution. | 11 * documentation and/or other materials provided with the distribution. |
| 12 * | 12 * |
| 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY | 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY |
| 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR | 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR |
| 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
| 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
| 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef Scrollbar_h | 26 #ifndef Scrollbar_h |
| 27 #define Scrollbar_h | 27 #define Scrollbar_h |
| 28 | 28 |
| 29 #include "platform/FrameViewBase.h" | |
| 30 #include "platform/Timer.h" | 29 #include "platform/Timer.h" |
| 31 #include "platform/graphics/paint/DisplayItem.h" | 30 #include "platform/graphics/paint/DisplayItem.h" |
| 32 #include "platform/heap/Handle.h" | 31 #include "platform/heap/Handle.h" |
| 33 #include "platform/scroll/ScrollTypes.h" | 32 #include "platform/scroll/ScrollTypes.h" |
| 33 #include "platform/scroll/ScrollbarManager.h" |
| 34 #include "platform/scroll/ScrollbarThemeClient.h" | 34 #include "platform/scroll/ScrollbarThemeClient.h" |
| 35 #include "platform/wtf/MathExtras.h" | 35 #include "platform/wtf/MathExtras.h" |
| 36 | 36 |
| 37 namespace blink { | 37 namespace blink { |
| 38 | 38 |
| 39 class CullRect; | 39 class CullRect; |
| 40 class GraphicsContext; | 40 class GraphicsContext; |
| 41 class IntRect; | 41 class IntRect; |
| 42 class PlatformChromeClient; | 42 class PlatformChromeClient; |
| 43 class ScrollableArea; | 43 class ScrollableArea; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 68 ~Scrollbar() override; | 68 ~Scrollbar() override; |
| 69 | 69 |
| 70 // ScrollbarThemeClient implementation. | 70 // ScrollbarThemeClient implementation. |
| 71 int X() const override { return frame_rect_.X(); } | 71 int X() const override { return frame_rect_.X(); } |
| 72 int Y() const override { return frame_rect_.Y(); } | 72 int Y() const override { return frame_rect_.Y(); } |
| 73 int Width() const override { return frame_rect_.Width(); } | 73 int Width() const override { return frame_rect_.Width(); } |
| 74 int Height() const override { return frame_rect_.Height(); } | 74 int Height() const override { return frame_rect_.Height(); } |
| 75 IntSize Size() const override { return frame_rect_.Size(); } | 75 IntSize Size() const override { return frame_rect_.Size(); } |
| 76 IntPoint Location() const override { return frame_rect_.Location(); } | 76 IntPoint Location() const override { return frame_rect_.Location(); } |
| 77 | 77 |
| 78 virtual void SetParent(FrameViewBase* parent) { parent_ = parent; } | 78 virtual void SetParent(ScrollbarManager* parent) { parent_ = parent; } |
| 79 FrameViewBase* Parent() const { return parent_; } | 79 ScrollbarManager* Parent() const { return parent_; } |
| 80 | 80 |
| 81 void SetFrameRect(const IntRect&); | 81 void SetFrameRect(const IntRect&); |
| 82 IntRect FrameRect() const override { return frame_rect_; } | 82 IntRect FrameRect() const override { return frame_rect_; } |
| 83 | 83 |
| 84 ScrollbarOverlayColorTheme GetScrollbarOverlayColorTheme() const override; | 84 ScrollbarOverlayColorTheme GetScrollbarOverlayColorTheme() const override; |
| 85 void GetTickmarks(Vector<IntRect>&) const override; | 85 void GetTickmarks(Vector<IntRect>&) const override; |
| 86 bool IsScrollableAreaActive() const override; | 86 bool IsScrollableAreaActive() const override; |
| 87 | 87 |
| 88 IntPoint ConvertFromRootFrame( | 88 IntPoint ConvertFromRootFrame( |
| 89 const IntPoint& point_in_root_frame) const override; | 89 const IntPoint& point_in_root_frame) const override; |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 } | 245 } |
| 246 | 246 |
| 247 float ScrollableAreaCurrentPos() const; | 247 float ScrollableAreaCurrentPos() const; |
| 248 float ScrollableAreaTargetPos() const; | 248 float ScrollableAreaTargetPos() const; |
| 249 bool ThumbWillBeUnderMouse() const; | 249 bool ThumbWillBeUnderMouse() const; |
| 250 | 250 |
| 251 int theme_scrollbar_thickness_; | 251 int theme_scrollbar_thickness_; |
| 252 bool track_needs_repaint_; | 252 bool track_needs_repaint_; |
| 253 bool thumb_needs_repaint_; | 253 bool thumb_needs_repaint_; |
| 254 LayoutRect visual_rect_; | 254 LayoutRect visual_rect_; |
| 255 Member<FrameViewBase> parent_; | 255 Member<ScrollbarManager> parent_; |
| 256 IntRect frame_rect_; | 256 IntRect frame_rect_; |
| 257 }; | 257 }; |
| 258 | 258 |
| 259 } // namespace blink | 259 } // namespace blink |
| 260 | 260 |
| 261 #endif // Scrollbar_h | 261 #endif // Scrollbar_h |
| OLD | NEW |