CaptionUserPreferencesMediaAF.h [plain text]
#ifndef CaptionUserPreferencesMediaAF_h
#define CaptionUserPreferencesMediaAF_h
#if ENABLE(VIDEO_TRACK)
#include "CSSPropertyNames.h"
#include "CaptionUserPreferences.h"
#include "Color.h"
#include <wtf/HashSet.h>
namespace WebCore {
class CaptionUserPreferencesMediaAF : public CaptionUserPreferences {
public:
static PassOwnPtr<CaptionUserPreferencesMediaAF> create(PageGroup* group) { return adoptPtr(new CaptionUserPreferencesMediaAF(group)); }
virtual ~CaptionUserPreferencesMediaAF();
#if HAVE(MEDIA_ACCESSIBILITY_FRAMEWORK)
virtual CaptionDisplayMode captionDisplayMode() const OVERRIDE;
virtual void setCaptionDisplayMode(CaptionDisplayMode) OVERRIDE;
virtual bool userPrefersCaptions() const OVERRIDE;
virtual bool userPrefersSubtitles() const OVERRIDE;
virtual float captionFontSizeScaleAndImportance(bool&) const OVERRIDE;
virtual void setInterestedInCaptionPreferenceChanges() OVERRIDE;
virtual void setPreferredLanguage(const String&) OVERRIDE;
virtual Vector<String> preferredLanguages() const OVERRIDE;
virtual void captionPreferencesChanged() OVERRIDE;
bool shouldFilterTrackMenu() const { return true; }
#else
bool shouldFilterTrackMenu() const { return false; }
#endif
virtual String captionsStyleSheetOverride() const OVERRIDE;
virtual int textTrackSelectionScore(TextTrack*, HTMLMediaElement*) const OVERRIDE;
virtual Vector<RefPtr<TextTrack> > sortedTrackListForMenu(TextTrackList*) OVERRIDE;
virtual String displayNameForTrack(TextTrack*) const OVERRIDE;
private:
CaptionUserPreferencesMediaAF(PageGroup*);
#if HAVE(MEDIA_ACCESSIBILITY_FRAMEWORK)
String captionsWindowCSS() const;
String captionsBackgroundCSS() const;
String captionsTextColorCSS() const;
Color captionsTextColor(bool&) const;
String captionsDefaultFontCSS() const;
Color captionsEdgeColorForTextColor(const Color&) const;
String windowRoundedCornerRadiusCSS() const;
String captionsTextEdgeCSS() const;
String cssPropertyWithTextEdgeColor(CSSPropertyID, const String&, const Color&, bool) const;
String colorPropertyCSS(CSSPropertyID, const Color&, bool) const;
bool m_listeningForPreferenceChanges;
#endif
};
}
#endif
#endif