1f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)// Copyright 2014 The Chromium Authors. All rights reserved. 290dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 390dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)// found in the LICENSE file. 490dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) 503b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)#ifndef CC_BLINK_SCROLLBAR_IMPL_H_ 603b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)#define CC_BLINK_SCROLLBAR_IMPL_H_ 790dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) 890dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)#include "base/basictypes.h" 990dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)#include "base/memory/scoped_ptr.h" 1090dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)#include "cc/input/scrollbar.h" 11868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)#include "third_party/WebKit/public/platform/WebScrollbarThemePainter.h" 1290dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) 13f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)namespace blink { 1490dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)class WebScrollbar; 1590dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)class WebScrollbarThemeGeometry; 1690dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)} 1790dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) 1803b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)namespace cc_blink { 1990dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) 2090dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)class ScrollbarImpl : public cc::Scrollbar { 2190dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) public: 22f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) ScrollbarImpl(scoped_ptr<blink::WebScrollbar> scrollbar, 23f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) blink::WebScrollbarThemePainter painter, 24f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) scoped_ptr<blink::WebScrollbarThemeGeometry> geometry); 2590dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) virtual ~ScrollbarImpl(); 2690dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) 2790dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) // cc::Scrollbar implementation. 2890dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) virtual cc::ScrollbarOrientation Orientation() const OVERRIDE; 2958537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) virtual bool IsLeftSideVerticalScrollbar() const OVERRIDE; 3090dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) virtual bool HasThumb() const OVERRIDE; 3190dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) virtual bool IsOverlay() const OVERRIDE; 3290dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) virtual gfx::Point Location() const OVERRIDE; 3390dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) virtual int ThumbThickness() const OVERRIDE; 3490dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) virtual int ThumbLength() const OVERRIDE; 3590dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) virtual gfx::Rect TrackRect() const OVERRIDE; 3690dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) virtual void PaintPart(SkCanvas* canvas, 3790dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) cc::ScrollbarPart part, 385d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const gfx::Rect& content_rect) OVERRIDE; 3990dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) 4090dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) private: 41f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) scoped_ptr<blink::WebScrollbar> scrollbar_; 42f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) blink::WebScrollbarThemePainter painter_; 43f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) scoped_ptr<blink::WebScrollbarThemeGeometry> geometry_; 4490dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) 4590dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) DISALLOW_COPY_AND_ASSIGN(ScrollbarImpl); 4690dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)}; 4790dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) 4803b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)} // namespace cc_blink 4990dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) 5003b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)#endif // CC_BLINK_SCROLLBAR_IMPL_H_ 51