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

Side by Side Diff: third_party/WebKit/Source/platform/scroll/ScrollbarTheme.h

Issue 2650403006: Remove PlatformMouseEvent and use WebMouseEvent instead (Closed)
Patch Set: Fix nits Created 3 years, 10 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
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/geometry/IntRect.h" 30 #include "platform/geometry/IntRect.h"
31 #include "platform/graphics/paint/DisplayItem.h" 31 #include "platform/graphics/paint/DisplayItem.h"
32 #include "platform/scroll/ScrollTypes.h" 32 #include "platform/scroll/ScrollTypes.h"
33 #include "platform/scroll/Scrollbar.h" 33 #include "platform/scroll/Scrollbar.h"
34 #include "public/platform/WebScrollbarButtonsPlacement.h" 34 #include "public/platform/WebScrollbarButtonsPlacement.h"
35 35
36 namespace blink { 36 namespace blink {
37 37
38 class CullRect; 38 class CullRect;
39 class GraphicsContext; 39 class GraphicsContext;
40 class PlatformMouseEvent; 40 class WebMouseEvent;
41 41
42 class PLATFORM_EXPORT ScrollbarTheme { 42 class PLATFORM_EXPORT ScrollbarTheme {
43 WTF_MAKE_NONCOPYABLE(ScrollbarTheme); 43 WTF_MAKE_NONCOPYABLE(ScrollbarTheme);
44 USING_FAST_MALLOC(ScrollbarTheme); 44 USING_FAST_MALLOC(ScrollbarTheme);
45 45
46 public: 46 public:
47 ScrollbarTheme() {} 47 ScrollbarTheme() {}
48 virtual ~ScrollbarTheme() {} 48 virtual ~ScrollbarTheme() {}
49 49
50 // If true, then scrollbars with this theme will be painted every time 50 // If true, then scrollbars with this theme will be painted every time
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 virtual ScrollbarPart invalidateOnEnabledChange() const { return AllParts; } 99 virtual ScrollbarPart invalidateOnEnabledChange() const { return AllParts; }
100 100
101 virtual void paintScrollCorner(GraphicsContext&, 101 virtual void paintScrollCorner(GraphicsContext&,
102 const DisplayItemClient&, 102 const DisplayItemClient&,
103 const IntRect& cornerRect); 103 const IntRect& cornerRect);
104 virtual void paintTickmarks(GraphicsContext&, 104 virtual void paintTickmarks(GraphicsContext&,
105 const Scrollbar&, 105 const Scrollbar&,
106 const IntRect&); 106 const IntRect&);
107 107
108 virtual bool shouldCenterOnThumb(const ScrollbarThemeClient&, 108 virtual bool shouldCenterOnThumb(const ScrollbarThemeClient&,
109 const PlatformMouseEvent&); 109 const WebMouseEvent&);
110 virtual bool shouldSnapBackToDragOrigin(const ScrollbarThemeClient&, 110 virtual bool shouldSnapBackToDragOrigin(const ScrollbarThemeClient&,
111 const PlatformMouseEvent&); 111 const WebMouseEvent&);
112 virtual bool shouldDragDocumentInsteadOfThumb(const ScrollbarThemeClient&, 112 virtual bool shouldDragDocumentInsteadOfThumb(const ScrollbarThemeClient&,
113 const PlatformMouseEvent&) { 113 const WebMouseEvent&) {
114 return false; 114 return false;
115 } 115 }
116 116
117 // The position of the thumb relative to the track. 117 // The position of the thumb relative to the track.
118 int thumbPosition(const ScrollbarThemeClient& scrollbar) { 118 int thumbPosition(const ScrollbarThemeClient& scrollbar) {
119 return thumbPosition(scrollbar, scrollbar.currentPos()); 119 return thumbPosition(scrollbar, scrollbar.currentPos());
120 } 120 }
121 virtual double overlayScrollbarFadeOutDelaySeconds() const; 121 virtual double overlayScrollbarFadeOutDelaySeconds() const;
122 virtual double overlayScrollbarFadeOutDurationSeconds() const; 122 virtual double overlayScrollbarFadeOutDurationSeconds() const;
123 // The position the thumb would have, relative to the track, at the specified 123 // The position the thumb would have, relative to the track, at the specified
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 static DisplayItem::Type trackPiecePartToDisplayItemType(ScrollbarPart); 196 static DisplayItem::Type trackPiecePartToDisplayItemType(ScrollbarPart);
197 197
198 private: 198 private:
199 static ScrollbarTheme& 199 static ScrollbarTheme&
200 nativeTheme(); // Must be implemented to return the correct theme subclass. 200 nativeTheme(); // Must be implemented to return the correct theme subclass.
201 static bool gMockScrollbarsEnabled; 201 static bool gMockScrollbarsEnabled;
202 }; 202 };
203 203
204 } // namespace blink 204 } // namespace blink
205 #endif 205 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/scroll/Scrollbar.cpp ('k') | third_party/WebKit/Source/platform/scroll/ScrollbarTheme.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698