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

Side by Side Diff: Source/WebCore/html/MediaController.h

Issue 13454026: Update all float attributes in HTMLMediaElement and related objects to double (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed GTK change since the file is gone now. Created 7 years, 8 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) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 void addMediaElement(HTMLMediaElement*); 53 void addMediaElement(HTMLMediaElement*);
54 void removeMediaElement(HTMLMediaElement*); 54 void removeMediaElement(HTMLMediaElement*);
55 bool containsMediaElement(HTMLMediaElement*) const; 55 bool containsMediaElement(HTMLMediaElement*) const;
56 56
57 const String& mediaGroup() const { return m_mediaGroup; } 57 const String& mediaGroup() const { return m_mediaGroup; }
58 58
59 virtual PassRefPtr<TimeRanges> buffered() const; 59 virtual PassRefPtr<TimeRanges> buffered() const;
60 virtual PassRefPtr<TimeRanges> seekable() const; 60 virtual PassRefPtr<TimeRanges> seekable() const;
61 virtual PassRefPtr<TimeRanges> played(); 61 virtual PassRefPtr<TimeRanges> played();
62 62
63 virtual float duration() const; 63 virtual double duration() const;
64 virtual float currentTime() const; 64 virtual double currentTime() const;
65 virtual void setCurrentTime(float, ExceptionCode&); 65 virtual void setCurrentTime(double, ExceptionCode&);
66 66
67 virtual bool paused() const { return m_paused; } 67 virtual bool paused() const { return m_paused; }
68 virtual void play(); 68 virtual void play();
69 virtual void pause(); 69 virtual void pause();
70 void unpause(); 70 void unpause();
71 71
72 virtual float defaultPlaybackRate() const { return m_defaultPlaybackRate; } 72 virtual double defaultPlaybackRate() const { return m_defaultPlaybackRate; }
73 virtual void setDefaultPlaybackRate(float); 73 virtual void setDefaultPlaybackRate(double);
74 74
75 virtual float playbackRate() const; 75 virtual double playbackRate() const;
76 virtual void setPlaybackRate(float); 76 virtual void setPlaybackRate(double);
77 77
78 virtual float volume() const { return m_volume; } 78 virtual double volume() const { return m_volume; }
79 virtual void setVolume(float, ExceptionCode&); 79 virtual void setVolume(double, ExceptionCode&);
80 80
81 virtual bool muted() const { return m_muted; } 81 virtual bool muted() const { return m_muted; }
82 virtual void setMuted(bool); 82 virtual void setMuted(bool);
83 83
84 virtual ReadyState readyState() const { return m_readyState; } 84 virtual ReadyState readyState() const { return m_readyState; }
85 85
86 enum PlaybackState { WAITING, PLAYING, ENDED }; 86 enum PlaybackState { WAITING, PLAYING, ENDED };
87 const AtomicString& playbackState() const; 87 const AtomicString& playbackState() const;
88 88
89 virtual bool supportsFullscreen() const { return false; } 89 virtual bool supportsFullscreen() const { return false; }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 virtual const AtomicString& interfaceName() const; 136 virtual const AtomicString& interfaceName() const;
137 virtual ScriptExecutionContext* scriptExecutionContext() const { return m_sc riptExecutionContext; }; 137 virtual ScriptExecutionContext* scriptExecutionContext() const { return m_sc riptExecutionContext; };
138 virtual EventTargetData* eventTargetData() { return &m_eventTargetData; } 138 virtual EventTargetData* eventTargetData() { return &m_eventTargetData; }
139 virtual EventTargetData* ensureEventTargetData() { return &m_eventTargetData ; } 139 virtual EventTargetData* ensureEventTargetData() { return &m_eventTargetData ; }
140 EventTargetData m_eventTargetData; 140 EventTargetData m_eventTargetData;
141 141
142 friend class HTMLMediaElement; 142 friend class HTMLMediaElement;
143 friend class MediaControllerEventListener; 143 friend class MediaControllerEventListener;
144 Vector<HTMLMediaElement*> m_mediaElements; 144 Vector<HTMLMediaElement*> m_mediaElements;
145 bool m_paused; 145 bool m_paused;
146 float m_defaultPlaybackRate; 146 double m_defaultPlaybackRate;
147 float m_volume; 147 double m_volume;
148 mutable float m_position; 148 mutable double m_position;
149 bool m_muted; 149 bool m_muted;
150 ReadyState m_readyState; 150 ReadyState m_readyState;
151 PlaybackState m_playbackState; 151 PlaybackState m_playbackState;
152 Vector<RefPtr<Event> > m_pendingEvents; 152 Vector<RefPtr<Event> > m_pendingEvents;
153 Timer<MediaController> m_asyncEventTimer; 153 Timer<MediaController> m_asyncEventTimer;
154 mutable Timer<MediaController> m_clearPositionTimer; 154 mutable Timer<MediaController> m_clearPositionTimer;
155 String m_mediaGroup; 155 String m_mediaGroup;
156 bool m_closedCaptionsVisible; 156 bool m_closedCaptionsVisible;
157 PassRefPtr<Clock> m_clock; 157 PassRefPtr<Clock> m_clock;
158 ScriptExecutionContext* m_scriptExecutionContext; 158 ScriptExecutionContext* m_scriptExecutionContext;
159 Timer<MediaController> m_timeupdateTimer; 159 Timer<MediaController> m_timeupdateTimer;
160 double m_previousTimeupdateTime; 160 double m_previousTimeupdateTime;
161 }; 161 };
162 162
163 } // namespace WebCore 163 } // namespace WebCore
164 164
165 #endif 165 #endif
166 #endif 166 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698