Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Side by Side Diff: Source/platform/scroll/ScrollbarThemeMacCommon.h

Issue 151483008: Re-add snap-back behavior (Blink side) (Closed) Base URL: svn://svn.chromium.org/blink/trunk/
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple 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 19 matching lines...) Expand all
30 #include "platform/scroll/ScrollbarTheme.h" 30 #include "platform/scroll/ScrollbarTheme.h"
31 31
32 namespace WebCore { 32 namespace WebCore {
33 33
34 class PLATFORM_EXPORT ScrollbarThemeMacCommon : public ScrollbarTheme { 34 class PLATFORM_EXPORT ScrollbarThemeMacCommon : public ScrollbarTheme {
35 public: 35 public:
36 virtual ~ScrollbarThemeMacCommon(); 36 virtual ~ScrollbarThemeMacCommon();
37 37
38 virtual void registerScrollbar(ScrollbarThemeClient*) OVERRIDE; 38 virtual void registerScrollbar(ScrollbarThemeClient*) OVERRIDE;
39 virtual void unregisterScrollbar(ScrollbarThemeClient*) OVERRIDE; 39 virtual void unregisterScrollbar(ScrollbarThemeClient*) OVERRIDE;
40 void preferencesChanged(float initialButtonDelay, float autoscrollButtonDela y, bool jumpOnTrackClick, NSScrollerStyle preferredScrollerStyle, bool redraw); 40 void preferencesChanged(float initialButtonDelay, float autoscrollButtonDela y, NSScrollerStyle preferredScrollerStyle, bool redraw);
41 41
42 virtual bool supportsControlTints() const OVERRIDE { return true; } 42 virtual bool supportsControlTints() const OVERRIDE { return true; }
43 43
44 virtual double initialAutoscrollTimerDelay() OVERRIDE; 44 virtual double initialAutoscrollTimerDelay() OVERRIDE;
45 virtual double autoscrollTimerDelay() OVERRIDE; 45 virtual double autoscrollTimerDelay() OVERRIDE;
46 46
47 virtual void paintOverhangBackground(GraphicsContext*, const IntRect& horizo ntalOverhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect) OVERRIDE; 47 virtual void paintOverhangBackground(GraphicsContext*, const IntRect& horizo ntalOverhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect) OVERRIDE;
48 virtual void paintOverhangShadows(GraphicsContext*, const IntSize& scrollOff set, const IntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect) OVERRIDE; 48 virtual void paintOverhangShadows(GraphicsContext*, const IntSize& scrollOff set, const IntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect) OVERRIDE;
49 virtual void paintTickmarks(GraphicsContext*, ScrollbarThemeClient*, const I ntRect&) OVERRIDE; 49 virtual void paintTickmarks(GraphicsContext*, ScrollbarThemeClient*, const I ntRect&) OVERRIDE;
50 50
51 static NSScrollerStyle recommendedScrollerStyle(); 51 static NSScrollerStyle recommendedScrollerStyle();
52 52
53 static bool isOverlayAPIAvailable(); 53 static bool isOverlayAPIAvailable();
54 54
55 protected: 55 protected:
56 virtual int maxOverlapBetweenPages() OVERRIDE { return 40; } 56 virtual int maxOverlapBetweenPages() OVERRIDE { return 40; }
57 57
58 virtual bool shouldCenterOnThumb(ScrollbarThemeClient*, const PlatformMouseE vent&) OVERRIDE;
59 virtual bool shouldDragDocumentInsteadOfThumb(ScrollbarThemeClient*, const P latformMouseEvent&) OVERRIDE; 58 virtual bool shouldDragDocumentInsteadOfThumb(ScrollbarThemeClient*, const P latformMouseEvent&) OVERRIDE;
60 int scrollbarPartToHIPressedState(ScrollbarPart); 59 int scrollbarPartToHIPressedState(ScrollbarPart);
61 60
62 virtual void updateButtonPlacement() { } 61 virtual void updateButtonPlacement() { }
63 62
64 void paintGivenTickmarks(GraphicsContext*, ScrollbarThemeClient*, const IntR ect&, const Vector<IntRect>&); 63 void paintGivenTickmarks(GraphicsContext*, ScrollbarThemeClient*, const IntR ect&, const Vector<IntRect>&);
65 64
66 RefPtr<Pattern> m_overhangPattern; 65 RefPtr<Pattern> m_overhangPattern;
67 }; 66 };
68 67
69 } 68 }
70 69
71 #endif // ScrollbarThemeMacCommon_h 70 #endif // ScrollbarThemeMacCommon_h
OLDNEW
« no previous file with comments | « Source/platform/scroll/ScrollbarThemeGtkOrAura.cpp ('k') | Source/platform/scroll/ScrollbarThemeMacCommon.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698