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

Side by Side Diff: Source/core/html/shadow/MediaControls.h

Issue 143703007: Tweak the public/protected/private sections of MediaControls (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 10 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 | « no previous file | Source/core/html/shadow/MediaControls.cpp » ('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) 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 virtual ~MediaControls() {} 46 virtual ~MediaControls() {}
47 47
48 static PassRefPtr<MediaControls> create(Document&); 48 static PassRefPtr<MediaControls> create(Document&);
49 49
50 virtual void setMediaController(MediaControllerInterface*); 50 virtual void setMediaController(MediaControllerInterface*);
51 51
52 void reset(); 52 void reset();
53 53
54 void show(); 54 void show();
55 void hide(); 55 void hide();
56 void makeOpaque();
57 void makeTransparent();
58 virtual bool shouldHideControls();
59 56
60 void bufferingProgressed(); 57 void bufferingProgressed();
61 virtual void playbackStarted(); 58 virtual void playbackStarted();
62 void playbackProgressed(); 59 void playbackProgressed();
63 virtual void playbackStopped(); 60 virtual void playbackStopped();
64 61
65 void updateCurrentTimeDisplay(); 62 void updateCurrentTimeDisplay();
66 void showVolumeSlider(); 63 void showVolumeSlider();
67 64
68 void changedMute(); 65 void changedMute();
69 void changedVolume(); 66 void changedVolume();
70 67
71 void changedClosedCaptionsVisibility(); 68 void changedClosedCaptionsVisibility();
72 void refreshClosedCaptionsButtonVisibility(); 69 void refreshClosedCaptionsButtonVisibility();
73 void closedCaptionTracksChanged(); 70 void closedCaptionTracksChanged();
74 71
75 void enteredFullscreen(); 72 void enteredFullscreen();
76 void exitedFullscreen(); 73 void exitedFullscreen();
77 74
78 virtual bool willRespondToMouseMoveEvents() OVERRIDE { return true; } 75 void updateTextTrackDisplay();
76
77 protected:
78 explicit MediaControls(Document&);
79
80 virtual bool initializeControls(Document&);
81
82 virtual bool shouldHideControls();
83
84 virtual void insertTextTrackContainer(PassRefPtr<MediaControlTextTrackContai nerElement>);
85
86 private:
87 void makeOpaque();
88 void makeTransparent();
79 89
80 void hideFullscreenControlsTimerFired(Timer<MediaControls>*); 90 void hideFullscreenControlsTimerFired(Timer<MediaControls>*);
81 void startHideFullscreenControlsTimer(); 91 void startHideFullscreenControlsTimer();
82 void stopHideFullscreenControlsTimer(); 92 void stopHideFullscreenControlsTimer();
83 93
84 void createTextTrackDisplay(); 94 void createTextTrackDisplay();
85 void showTextTrackDisplay(); 95 void showTextTrackDisplay();
86 void hideTextTrackDisplay(); 96 void hideTextTrackDisplay();
87 void updateTextTrackDisplay();
88 virtual void insertTextTrackContainer(PassRefPtr<MediaControlTextTrackContai nerElement>);
89 97
90 protected: 98 // Node
91 explicit MediaControls(Document&); 99 virtual bool isMediaControls() const OVERRIDE FINAL { return true; }
100 virtual bool willRespondToMouseMoveEvents() OVERRIDE { return true; }
101 virtual void defaultEventHandler(Event*) OVERRIDE;
102 bool containsRelatedTarget(Event*);
92 103
93 virtual bool initializeControls(Document&); 104 // Element
94 105 virtual const AtomicString& shadowPseudoId() const OVERRIDE;
95 virtual void defaultEventHandler(Event*) OVERRIDE;
96
97 bool containsRelatedTarget(Event*);
98 106
99 MediaControllerInterface* m_mediaController; 107 MediaControllerInterface* m_mediaController;
100 108
101 // Container for the media control elements. 109 // Container for the media control elements.
102 MediaControlPanelElement* m_panel; 110 MediaControlPanelElement* m_panel;
103 111
104 // Container for the text track cues. 112 // Container for the text track cues.
105 MediaControlTextTrackContainerElement* m_textDisplayContainer; 113 MediaControlTextTrackContainerElement* m_textDisplayContainer;
106 114
107 // Media control elements. 115 // Media control elements.
108 MediaControlPlayButtonElement* m_playButton; 116 MediaControlPlayButtonElement* m_playButton;
109 MediaControlCurrentTimeDisplayElement* m_currentTimeDisplay; 117 MediaControlCurrentTimeDisplayElement* m_currentTimeDisplay;
110 MediaControlTimelineElement* m_timeline; 118 MediaControlTimelineElement* m_timeline;
111 MediaControlPanelMuteButtonElement* m_panelMuteButton; 119 MediaControlPanelMuteButtonElement* m_panelMuteButton;
112 MediaControlPanelVolumeSliderElement* m_volumeSlider; 120 MediaControlPanelVolumeSliderElement* m_volumeSlider;
113 MediaControlToggleClosedCaptionsButtonElement* m_toggleClosedCaptionsButton; 121 MediaControlToggleClosedCaptionsButtonElement* m_toggleClosedCaptionsButton;
114 MediaControlFullscreenButtonElement* m_fullScreenButton; 122 MediaControlFullscreenButtonElement* m_fullScreenButton;
123 MediaControlTimeRemainingDisplayElement* m_durationDisplay;
124 MediaControlPanelEnclosureElement* m_enclosure;
115 125
116 Timer<MediaControls> m_hideFullscreenControlsTimer; 126 Timer<MediaControls> m_hideFullscreenControlsTimer;
117 bool m_isFullscreen; 127 bool m_isFullscreen;
118 bool m_isMouseOverControls; 128 bool m_isMouseOverControls;
119
120 private:
121 virtual bool isMediaControls() const OVERRIDE FINAL { return true; }
122
123 virtual const AtomicString& shadowPseudoId() const OVERRIDE;
124
125 MediaControlTimeRemainingDisplayElement* m_durationDisplay;
126 MediaControlPanelEnclosureElement* m_enclosure;
127 }; 129 };
128 130
129 DEFINE_NODE_TYPE_CASTS(MediaControls, isMediaControls()); 131 DEFINE_NODE_TYPE_CASTS(MediaControls, isMediaControls());
130 132
131 } 133 }
132 134
133 #endif 135 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/shadow/MediaControls.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698