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

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: 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 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 virtual bool isMediaControls() const OVERRIDE FINAL { return true; }
91 explicit MediaControls(Document&);
92 99
93 bool initializeControls(Document&); 100 virtual const AtomicString& shadowPseudoId() const OVERRIDE;
94 101
102 virtual bool willRespondToMouseMoveEvents() OVERRIDE { return true; }
acolwell GONE FROM CHROMIUM 2014/02/07 22:08:40 nit: Please add a comment indicating that these ar
philipj_slow 2014/02/08 04:00:24 Done.
95 virtual void defaultEventHandler(Event*) OVERRIDE; 103 virtual void defaultEventHandler(Event*) OVERRIDE;
96
97 bool containsRelatedTarget(Event*); 104 bool containsRelatedTarget(Event*);
98 105
99 MediaControllerInterface* m_mediaController; 106 MediaControllerInterface* m_mediaController;
100 107
101 // Container for the media control elements. 108 // Container for the media control elements.
102 MediaControlPanelElement* m_panel; 109 MediaControlPanelElement* m_panel;
103 110
104 // Container for the text track cues. 111 // Container for the text track cues.
105 MediaControlTextTrackContainerElement* m_textDisplayContainer; 112 MediaControlTextTrackContainerElement* m_textDisplayContainer;
106 113
107 // Media control elements. 114 // Media control elements.
108 MediaControlPlayButtonElement* m_playButton; 115 MediaControlPlayButtonElement* m_playButton;
109 MediaControlCurrentTimeDisplayElement* m_currentTimeDisplay; 116 MediaControlCurrentTimeDisplayElement* m_currentTimeDisplay;
110 MediaControlTimelineElement* m_timeline; 117 MediaControlTimelineElement* m_timeline;
111 MediaControlPanelMuteButtonElement* m_panelMuteButton; 118 MediaControlPanelMuteButtonElement* m_panelMuteButton;
112 MediaControlPanelVolumeSliderElement* m_volumeSlider; 119 MediaControlPanelVolumeSliderElement* m_volumeSlider;
113 MediaControlToggleClosedCaptionsButtonElement* m_toggleClosedCaptionsButton; 120 MediaControlToggleClosedCaptionsButtonElement* m_toggleClosedCaptionsButton;
114 MediaControlFullscreenButtonElement* m_fullScreenButton; 121 MediaControlFullscreenButtonElement* m_fullScreenButton;
122 MediaControlTimeRemainingDisplayElement* m_durationDisplay;
123 MediaControlPanelEnclosureElement* m_enclosure;
115 124
116 Timer<MediaControls> m_hideFullscreenControlsTimer; 125 Timer<MediaControls> m_hideFullscreenControlsTimer;
117 bool m_isFullscreen; 126 bool m_isFullscreen;
118 bool m_isMouseOverControls; 127 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 }; 128 };
128 129
129 DEFINE_NODE_TYPE_CASTS(MediaControls, isMediaControls()); 130 DEFINE_NODE_TYPE_CASTS(MediaControls, isMediaControls());
130 131
131 } 132 }
132 133
133 #endif 134 #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