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

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

Issue 2387053003: reflow comments in platform/{mediastream,scroll} (Closed)
Patch Set: blah Created 4 years, 2 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) 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
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 public ScrollbarThemeClient, 49 public ScrollbarThemeClient,
50 public DisplayItemClient { 50 public DisplayItemClient {
51 public: 51 public:
52 static Scrollbar* create(ScrollableArea* scrollableArea, 52 static Scrollbar* create(ScrollableArea* scrollableArea,
53 ScrollbarOrientation orientation, 53 ScrollbarOrientation orientation,
54 ScrollbarControlSize size, 54 ScrollbarControlSize size,
55 HostWindow* hostWindow) { 55 HostWindow* hostWindow) {
56 return new Scrollbar(scrollableArea, orientation, size, hostWindow); 56 return new Scrollbar(scrollableArea, orientation, size, hostWindow);
57 } 57 }
58 58
59 // Theme object ownership remains with the caller and it must outlive the scro llbar. 59 // Theme object ownership remains with the caller and it must outlive the
60 // scrollbar.
60 static Scrollbar* createForTesting(ScrollableArea* scrollableArea, 61 static Scrollbar* createForTesting(ScrollableArea* scrollableArea,
61 ScrollbarOrientation orientation, 62 ScrollbarOrientation orientation,
62 ScrollbarControlSize size, 63 ScrollbarControlSize size,
63 ScrollbarTheme* theme) { 64 ScrollbarTheme* theme) {
64 return new Scrollbar(scrollableArea, orientation, size, nullptr, theme); 65 return new Scrollbar(scrollableArea, orientation, size, nullptr, theme);
65 } 66 }
66 67
67 ~Scrollbar() override; 68 ~Scrollbar() override;
68 69
69 // ScrollbarThemeClient implementation. 70 // ScrollbarThemeClient implementation.
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 bool isOverlayScrollbar() const override; 131 bool isOverlayScrollbar() const override;
131 bool shouldParticipateInHitTesting(); 132 bool shouldParticipateInHitTesting();
132 133
133 bool isWindowActive() const; 134 bool isWindowActive() const;
134 135
135 // Return if the gesture event was handled. |shouldUpdateCapture| 136 // Return if the gesture event was handled. |shouldUpdateCapture|
136 // will be set to true if the handler should update the capture 137 // will be set to true if the handler should update the capture
137 // state for this scrollbar. 138 // state for this scrollbar.
138 bool gestureEvent(const PlatformGestureEvent&, bool* shouldUpdateCapture); 139 bool gestureEvent(const PlatformGestureEvent&, bool* shouldUpdateCapture);
139 140
140 // These methods are used for platform scrollbars to give :hover feedback. Th ey will not get called 141 // These methods are used for platform scrollbars to give :hover feedback.
141 // when the mouse went down in a scrollbar, since it is assumed the scrollbar will start 142 // They will not get called when the mouse went down in a scrollbar, since it
143 // is assumed the scrollbar will start
142 // grabbing all events in that case anyway. 144 // grabbing all events in that case anyway.
143 void mouseMoved(const PlatformMouseEvent&); 145 void mouseMoved(const PlatformMouseEvent&);
144 void mouseEntered(); 146 void mouseEntered();
145 void mouseExited(); 147 void mouseExited();
146 148
147 // Used by some platform scrollbars to know when they've been released from ca pture. 149 // Used by some platform scrollbars to know when they've been released from
150 // capture.
148 void mouseUp(const PlatformMouseEvent&); 151 void mouseUp(const PlatformMouseEvent&);
149 void mouseDown(const PlatformMouseEvent&); 152 void mouseDown(const PlatformMouseEvent&);
150 153
151 ScrollbarTheme& theme() const { return m_theme; } 154 ScrollbarTheme& theme() const { return m_theme; }
152 155
153 IntRect convertToContainingWidget(const IntRect&) const override; 156 IntRect convertToContainingWidget(const IntRect&) const override;
154 IntRect convertFromContainingWidget(const IntRect&) const override; 157 IntRect convertFromContainingWidget(const IntRect&) const override;
155 158
156 IntPoint convertToContainingWidget(const IntPoint&) const override; 159 IntPoint convertToContainingWidget(const IntPoint&) const override;
157 IntPoint convertFromContainingWidget(const IntPoint&) const override; 160 IntPoint convertFromContainingWidget(const IntPoint&) const override;
(...skipping 30 matching lines...) Expand all
188 // Otherwise, the ScrollableArea may redraw using cached renderings of 191 // Otherwise, the ScrollableArea may redraw using cached renderings of
189 // individual parts. For instance, if the scrollbar is composited, the thumb 192 // individual parts. For instance, if the scrollbar is composited, the thumb
190 // may be cached in a GPU texture (and is only guaranteed to be repainted if 193 // may be cached in a GPU texture (and is only guaranteed to be repainted if
191 // ThumbPart is invalidated). 194 // ThumbPart is invalidated).
192 // 195 //
193 // Even if no parts are invalidated, the scrollbar may need to be redrawn 196 // Even if no parts are invalidated, the scrollbar may need to be redrawn
194 // if, for instance, the thumb moves without changing the appearance of any 197 // if, for instance, the thumb moves without changing the appearance of any
195 // part. 198 // part.
196 void setNeedsPaintInvalidation(ScrollbarPart invalidParts); 199 void setNeedsPaintInvalidation(ScrollbarPart invalidParts);
197 200
198 // Promptly unregister from the theme manager + run finalizers of derived Scro llbars. 201 // Promptly unregister from the theme manager + run finalizers of derived
202 // Scrollbars.
199 EAGERLY_FINALIZE(); 203 EAGERLY_FINALIZE();
200 DECLARE_EAGER_FINALIZATION_OPERATOR_NEW(); 204 DECLARE_EAGER_FINALIZATION_OPERATOR_NEW();
201 DECLARE_VIRTUAL_TRACE(); 205 DECLARE_VIRTUAL_TRACE();
202 206
203 protected: 207 protected:
204 Scrollbar(ScrollableArea*, 208 Scrollbar(ScrollableArea*,
205 ScrollbarOrientation, 209 ScrollbarOrientation,
206 ScrollbarControlSize, 210 ScrollbarControlSize,
207 HostWindow* = 0, 211 HostWindow* = 0,
208 ScrollbarTheme* = 0); 212 ScrollbarTheme* = 0);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 261
258 DEFINE_TYPE_CASTS(Scrollbar, 262 DEFINE_TYPE_CASTS(Scrollbar,
259 Widget, 263 Widget,
260 widget, 264 widget,
261 widget->isScrollbar(), 265 widget->isScrollbar(),
262 widget.isScrollbar()); 266 widget.isScrollbar());
263 267
264 } // namespace blink 268 } // namespace blink
265 269
266 #endif // Scrollbar_h 270 #endif // Scrollbar_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698