190dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)// Copyright 2012 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) 590dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)#ifndef CC_TEST_FAKE_SCROLLBAR_H_ 690dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)#define CC_TEST_FAKE_SCROLLBAR_H_ 790dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) 890dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)#include "base/compiler_specific.h" 990dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)#include "cc/input/scrollbar.h" 1090dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)#include "third_party/skia/include/core/SkColor.h" 1190dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) 1290dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)namespace cc { 1390dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) 1490dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)class FakeScrollbar : public Scrollbar { 1590dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) public: 1690dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) FakeScrollbar(); 1790dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) FakeScrollbar(bool paint, bool has_thumb, bool is_overlay); 1890dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) virtual ~FakeScrollbar(); 1990dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) 2090dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) // Scrollbar implementation. 2190dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) virtual ScrollbarOrientation Orientation() const OVERRIDE; 2290dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) virtual gfx::Point Location() const OVERRIDE; 2390dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) virtual bool IsOverlay() const OVERRIDE; 2490dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) virtual bool HasThumb() const OVERRIDE; 2590dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) virtual int ThumbThickness() const OVERRIDE; 2690dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) virtual int ThumbLength() const OVERRIDE; 2790dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) virtual gfx::Rect TrackRect() const OVERRIDE; 2890dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) virtual void PaintPart(SkCanvas* canvas, 2990dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) ScrollbarPart part, 3090dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) gfx::Rect content_rect) OVERRIDE; 3190dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) 3290dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) void set_location(gfx::Point location) { location_ = location; } 3390dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) 3490dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) private: 3590dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) bool paint_; 3690dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) bool has_thumb_; 3790dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) bool is_overlay_; 3890dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) gfx::Point location_; 3990dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) SkColor fill_color_; 4090dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) 4190dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) DISALLOW_COPY_AND_ASSIGN(FakeScrollbar); 4290dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)}; 4390dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) 4490dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)} // namespace cc 4590dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) 4690dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)#endif // CC_TEST_FAKE_SCROLLBAR_H_ 47