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

Side by Side Diff: third_party/WebKit/public/platform/WebScrollbarThemePainter.h

Issue 1511003003: Use refs for non-null GraphicsContext, Scrollbar, etc. in scrollbar related code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ScrollbarRemove
Patch Set: yet another mac fix Created 5 years 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
« no previous file with comments | « third_party/WebKit/Source/web/tests/FrameTestHelpers.h ('k') | no next file » | 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google 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 * 7 *
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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 BLINK_PLATFORM_EXPORT void paintTickmarks(WebCanvas*, const WebRect&); 64 BLINK_PLATFORM_EXPORT void paintTickmarks(WebCanvas*, const WebRect&);
65 BLINK_PLATFORM_EXPORT void paintThumb(WebCanvas*, const WebRect&); 65 BLINK_PLATFORM_EXPORT void paintThumb(WebCanvas*, const WebRect&);
66 66
67 // This opacity is applied on top of the content that is painted for the thu mb. 67 // This opacity is applied on top of the content that is painted for the thu mb.
68 BLINK_PLATFORM_EXPORT float thumbOpacity() const; 68 BLINK_PLATFORM_EXPORT float thumbOpacity() const;
69 69
70 BLINK_PLATFORM_EXPORT bool trackNeedsRepaint() const; 70 BLINK_PLATFORM_EXPORT bool trackNeedsRepaint() const;
71 BLINK_PLATFORM_EXPORT bool thumbNeedsRepaint() const; 71 BLINK_PLATFORM_EXPORT bool thumbNeedsRepaint() const;
72 72
73 #if INSIDE_BLINK 73 #if INSIDE_BLINK
74 BLINK_PLATFORM_EXPORT WebScrollbarThemePainter(ScrollbarTheme*, Scrollbar*, float deviceScaleFactor); 74 BLINK_PLATFORM_EXPORT WebScrollbarThemePainter(ScrollbarTheme&, Scrollbar&, float deviceScaleFactor);
75 #endif 75 #endif
76 76
77 private: 77 private:
78 // The theme is not owned by this class. It is assumed that the theme is a 78 // The theme is not owned by this class. It is assumed that the theme is a
79 // static pointer and its lifetime is essentially infinite. The functions 79 // static pointer and its lifetime is essentially infinite. The functions
80 // called from the painter may not be thread-safe, so all calls must be made 80 // called from the painter may not be thread-safe, so all calls must be made
81 // from the same thread that it is created on. 81 // from the same thread that it is created on.
82 ScrollbarTheme* m_theme; 82 ScrollbarTheme* m_theme;
83 83
84 // It is assumed that the constructor of this paint object is responsible 84 // It is assumed that the constructor of this paint object is responsible
85 // for the lifetime of this scrollbar. The painter has to use the real 85 // for the lifetime of this scrollbar. The painter has to use the real
86 // scrollbar (and not a WebScrollbar wrapper) due to static_casts for 86 // scrollbar (and not a WebScrollbar wrapper) due to static_casts for
87 // LayoutScrollbar and pointer-based HashMap lookups for Lion scrollbars. 87 // LayoutScrollbar and pointer-based HashMap lookups for Lion scrollbars.
88 WebPrivatePtr<Scrollbar> m_scrollbar; 88 WebPrivatePtr<Scrollbar> m_scrollbar;
89 89
90 float m_deviceScaleFactor; 90 float m_deviceScaleFactor;
91 }; 91 };
92 92
93 } // namespace blink 93 } // namespace blink
94 94
95 #endif 95 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/FrameTestHelpers.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698