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

Side by Side Diff: Source/core/paint/MediaControlsPainter.h

Issue 1319893002: Make classes and structures in core/paint fast-allocated. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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) 2009 Apple Inc. 2 * Copyright (C) 2009 Apple Inc.
3 * Copyright (C) 2009 Google Inc. 3 * Copyright (C) 2009 Google Inc.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 10 matching lines...) Expand all
21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
22 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 22 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
23 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28 #ifndef MediaControlsPainter_h 28 #ifndef MediaControlsPainter_h
29 #define MediaControlsPainter_h 29 #define MediaControlsPainter_h
30 30
31 #include "wtf/Allocator.h"
32
31 namespace blink { 33 namespace blink {
32 34
33 struct PaintInfo; 35 struct PaintInfo;
34 36
35 class ComputedStyle; 37 class ComputedStyle;
36 class IntRect; 38 class IntRect;
37 class LayoutObject; 39 class LayoutObject;
38 40
39 class MediaControlsPainter { 41 class MediaControlsPainter {
42 STATIC_ONLY(MediaControlsPainter);
40 public: 43 public:
41 static bool paintMediaMuteButton(LayoutObject*, const PaintInfo&, const IntR ect&); 44 static bool paintMediaMuteButton(LayoutObject*, const PaintInfo&, const IntR ect&);
42 static bool paintMediaPlayButton(LayoutObject*, const PaintInfo&, const IntR ect&); 45 static bool paintMediaPlayButton(LayoutObject*, const PaintInfo&, const IntR ect&);
43 static bool paintMediaToggleClosedCaptionsButton(LayoutObject*, const PaintI nfo&, const IntRect&); 46 static bool paintMediaToggleClosedCaptionsButton(LayoutObject*, const PaintI nfo&, const IntRect&);
44 static bool paintMediaSlider(LayoutObject*, const PaintInfo&, const IntRect& ); 47 static bool paintMediaSlider(LayoutObject*, const PaintInfo&, const IntRect& );
45 static bool paintMediaSliderThumb(LayoutObject*, const PaintInfo&, const Int Rect&); 48 static bool paintMediaSliderThumb(LayoutObject*, const PaintInfo&, const Int Rect&);
46 static bool paintMediaVolumeSlider(LayoutObject*, const PaintInfo&, const In tRect&); 49 static bool paintMediaVolumeSlider(LayoutObject*, const PaintInfo&, const In tRect&);
47 static bool paintMediaVolumeSliderThumb(LayoutObject*, const PaintInfo&, con st IntRect&); 50 static bool paintMediaVolumeSliderThumb(LayoutObject*, const PaintInfo&, con st IntRect&);
48 static bool paintMediaFullscreenButton(LayoutObject*, const PaintInfo&, cons t IntRect&); 51 static bool paintMediaFullscreenButton(LayoutObject*, const PaintInfo&, cons t IntRect&);
49 static bool paintMediaOverlayPlayButton(LayoutObject*, const PaintInfo&, con st IntRect&); 52 static bool paintMediaOverlayPlayButton(LayoutObject*, const PaintInfo&, con st IntRect&);
50 static bool paintMediaCastButton(LayoutObject*, const PaintInfo&, const IntR ect&); 53 static bool paintMediaCastButton(LayoutObject*, const PaintInfo&, const IntR ect&);
51 static void adjustMediaSliderThumbSize(ComputedStyle&); 54 static void adjustMediaSliderThumbSize(ComputedStyle&);
52 55
53 private: 56 private:
54 static void adjustMediaSliderThumbPaintSize(const IntRect&, const ComputedSt yle&, IntRect& rectOut); 57 static void adjustMediaSliderThumbPaintSize(const IntRect&, const ComputedSt yle&, IntRect& rectOut);
55 static void paintMediaSliderInternal(LayoutObject*, const PaintInfo&, const IntRect&); 58 static void paintMediaSliderInternal(LayoutObject*, const PaintInfo&, const IntRect&);
56 }; 59 };
57 60
58 } // namespace blink 61 } // namespace blink
59 62
60 #endif // MediaControlsPainter_h 63 #endif // MediaControlsPainter_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698