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

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

Issue 131003004: Update platform classes to use OVERRIDE / FINAL when needed (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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
« no previous file with comments | « Source/platform/scroll/ScrollAnimatorNone.h ('k') | Source/platform/scroll/Scrollbar.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Holger Hans Peter Freyther 3 * Copyright (C) 2009 Holger Hans Peter Freyther
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 207
208 // Widget override to update our scrollbars and notify our contents of the r esize. 208 // Widget override to update our scrollbars and notify our contents of the r esize.
209 virtual void setFrameRect(const IntRect&); 209 virtual void setFrameRect(const IntRect&);
210 210
211 // Widget override to notify our contents of a cliprect change. 211 // Widget override to notify our contents of a cliprect change.
212 virtual void clipRectChanged() OVERRIDE; 212 virtual void clipRectChanged() OVERRIDE;
213 213
214 // For platforms that need to hit test scrollbars from within the engine's e vent handlers (like Win32). 214 // For platforms that need to hit test scrollbars from within the engine's e vent handlers (like Win32).
215 Scrollbar* scrollbarAtPoint(const IntPoint& windowPoint); 215 Scrollbar* scrollbarAtPoint(const IntPoint& windowPoint);
216 216
217 virtual IntPoint convertChildToSelf(const Widget* child, const IntPoint& poi nt) const 217 virtual IntPoint convertChildToSelf(const Widget* child, const IntPoint& poi nt) const OVERRIDE
218 { 218 {
219 IntPoint newPoint = point; 219 IntPoint newPoint = point;
220 if (!isScrollViewScrollbar(child)) 220 if (!isScrollViewScrollbar(child))
221 newPoint = point - scrollOffset(); 221 newPoint = point - scrollOffset();
222 newPoint.moveBy(child->location()); 222 newPoint.moveBy(child->location());
223 return newPoint; 223 return newPoint;
224 } 224 }
225 225
226 virtual IntPoint convertSelfToChild(const Widget* child, const IntPoint& poi nt) const 226 virtual IntPoint convertSelfToChild(const Widget* child, const IntPoint& poi nt) const OVERRIDE
227 { 227 {
228 IntPoint newPoint = point; 228 IntPoint newPoint = point;
229 if (!isScrollViewScrollbar(child)) 229 if (!isScrollViewScrollbar(child))
230 newPoint = point + scrollOffset(); 230 newPoint = point + scrollOffset();
231 newPoint.moveBy(-child->location()); 231 newPoint.moveBy(-child->location());
232 return newPoint; 232 return newPoint;
233 } 233 }
234 234
235 // Widget override. Handles painting of the contents of the view as well as the scrollbars. 235 // Widget override. Handles painting of the contents of the view as well as the scrollbars.
236 virtual void paint(GraphicsContext*, const IntRect&); 236 virtual void paint(GraphicsContext*, const IntRect&) OVERRIDE;
237 void paintScrollbars(GraphicsContext*, const IntRect&); 237 void paintScrollbars(GraphicsContext*, const IntRect&);
238 238
239 // Widget overrides to ensure that our children's visibility status is kept up to date when we get shown and hidden. 239 // Widget overrides to ensure that our children's visibility status is kept up to date when we get shown and hidden.
240 virtual void show(); 240 virtual void show() OVERRIDE;
241 virtual void hide(); 241 virtual void hide() OVERRIDE;
242 virtual void setParentVisible(bool); 242 virtual void setParentVisible(bool) OVERRIDE;
243 243
244 // Pan scrolling. 244 // Pan scrolling.
245 static const int noPanScrollRadius = 15; 245 static const int noPanScrollRadius = 15;
246 void addPanScrollIcon(const IntPoint&); 246 void addPanScrollIcon(const IntPoint&);
247 void removePanScrollIcon(); 247 void removePanScrollIcon();
248 void paintPanScrollIcon(GraphicsContext*); 248 void paintPanScrollIcon(GraphicsContext*);
249 249
250 virtual bool isPointInScrollbarCorner(const IntPoint&); 250 virtual bool isPointInScrollbarCorner(const IntPoint&);
251 virtual bool scrollbarCornerPresent() const; 251 virtual bool scrollbarCornerPresent() const;
252 virtual IntRect scrollCornerRect() const; 252 virtual IntRect scrollCornerRect() const;
253 virtual void paintScrollCorner(GraphicsContext*, const IntRect& cornerRect); 253 virtual void paintScrollCorner(GraphicsContext*, const IntRect& cornerRect);
254 virtual void paintScrollbar(GraphicsContext*, Scrollbar*, const IntRect&); 254 virtual void paintScrollbar(GraphicsContext*, Scrollbar*, const IntRect&);
255 255
256 virtual IntRect convertFromScrollbarToContainingView(const Scrollbar*, const IntRect&) const OVERRIDE; 256 virtual IntRect convertFromScrollbarToContainingView(const Scrollbar*, const IntRect&) const OVERRIDE;
257 virtual IntRect convertFromContainingViewToScrollbar(const Scrollbar*, const IntRect&) const OVERRIDE; 257 virtual IntRect convertFromContainingViewToScrollbar(const Scrollbar*, const IntRect&) const OVERRIDE;
258 virtual IntPoint convertFromScrollbarToContainingView(const Scrollbar*, cons t IntPoint&) const OVERRIDE; 258 virtual IntPoint convertFromScrollbarToContainingView(const Scrollbar*, cons t IntPoint&) const OVERRIDE;
259 virtual IntPoint convertFromContainingViewToScrollbar(const Scrollbar*, cons t IntPoint&) const OVERRIDE; 259 virtual IntPoint convertFromContainingViewToScrollbar(const Scrollbar*, cons t IntPoint&) const OVERRIDE;
260 260
261 void calculateAndPaintOverhangAreas(GraphicsContext*, const IntRect& dirtyRe ct); 261 void calculateAndPaintOverhangAreas(GraphicsContext*, const IntRect& dirtyRe ct);
262 void calculateAndPaintOverhangBackground(GraphicsContext*, const IntRect& di rtyRect); 262 void calculateAndPaintOverhangBackground(GraphicsContext*, const IntRect& di rtyRect);
263 263
264 virtual bool isScrollView() const OVERRIDE { return true; } 264 virtual bool isScrollView() const OVERRIDE FINAL { return true; }
265 265
266 protected: 266 protected:
267 ScrollView(); 267 ScrollView();
268 268
269 virtual void repaintContentRectangle(const IntRect&); 269 virtual void repaintContentRectangle(const IntRect&);
270 virtual void paintContents(GraphicsContext*, const IntRect& damageRect) = 0; 270 virtual void paintContents(GraphicsContext*, const IntRect& damageRect) = 0;
271 271
272 virtual void paintOverhangAreas(GraphicsContext*, const IntRect& horizontalO verhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect); 272 virtual void paintOverhangAreas(GraphicsContext*, const IntRect& horizontalO verhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect);
273 273
274 virtual void scrollbarExistenceDidChange() = 0; 274 virtual void scrollbarExistenceDidChange() = 0;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 void updateOverhangAreas(); 339 void updateOverhangAreas();
340 340
341 int pageStep(ScrollbarOrientation) const; 341 int pageStep(ScrollbarOrientation) const;
342 }; // class ScrollView 342 }; // class ScrollView
343 343
344 DEFINE_TYPE_CASTS(ScrollView, Widget, widget, widget->isScrollView(), widget.isS crollView()); 344 DEFINE_TYPE_CASTS(ScrollView, Widget, widget, widget->isScrollView(), widget.isS crollView());
345 345
346 } // namespace WebCore 346 } // namespace WebCore
347 347
348 #endif // ScrollView_h 348 #endif // ScrollView_h
OLDNEW
« no previous file with comments | « Source/platform/scroll/ScrollAnimatorNone.h ('k') | Source/platform/scroll/Scrollbar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698