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

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

Issue 297783004: Implement heuristic for showing media controls during playback w/o a mouse (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: IgnoreSelfHover -> IgnoreVideoHover; Tweak comment. Created 6 years, 7 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
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 void changedClosedCaptionsVisibility(); 60 void changedClosedCaptionsVisibility();
61 void refreshClosedCaptionsButtonVisibility(); 61 void refreshClosedCaptionsButtonVisibility();
62 void closedCaptionTracksChanged(); 62 void closedCaptionTracksChanged();
63 63
64 void enteredFullscreen(); 64 void enteredFullscreen();
65 void exitedFullscreen(); 65 void exitedFullscreen();
66 66
67 void updateTextTrackDisplay(); 67 void updateTextTrackDisplay();
68 68
69 void mediaElementFocused();
70
69 virtual void trace(Visitor*) OVERRIDE; 71 virtual void trace(Visitor*) OVERRIDE;
70 72
71 private: 73 private:
72 explicit MediaControls(HTMLMediaElement&); 74 explicit MediaControls(HTMLMediaElement&);
73 75
74 bool initializeControls(); 76 bool initializeControls();
75 77
76 void makeOpaque(); 78 void makeOpaque();
77 void makeTransparent(); 79 void makeTransparent();
78 80
79 void updatePlayState(); 81 void updatePlayState();
80 82
81 bool shouldHideMediaControls(); 83 enum HideBehaviorFlags {
84 IgnoreVideoHover = 1 << 0,
85 IgnoreFocus = 1 << 1
86 };
87
88 bool shouldHideMediaControls(unsigned behaviorFlags = 0) const;
82 void hideMediaControlsTimerFired(Timer<MediaControls>*); 89 void hideMediaControlsTimerFired(Timer<MediaControls>*);
83 void startHideMediaControlsTimer(); 90 void startHideMediaControlsTimer();
84 void stopHideMediaControlsTimer(); 91 void stopHideMediaControlsTimer();
85 92
86 void createTextTrackDisplay(); 93 void createTextTrackDisplay();
87 void showTextTrackDisplay(); 94 void showTextTrackDisplay();
88 void hideTextTrackDisplay(); 95 void hideTextTrackDisplay();
89 96
90 // Node 97 // Node
91 virtual bool isMediaControls() const OVERRIDE { return true; } 98 virtual bool isMediaControls() const OVERRIDE { return true; }
(...skipping 28 matching lines...) Expand all
120 Timer<MediaControls> m_hideMediaControlsTimer; 127 Timer<MediaControls> m_hideMediaControlsTimer;
121 bool m_isMouseOverControls : 1; 128 bool m_isMouseOverControls : 1;
122 bool m_isPausedForScrubbing : 1; 129 bool m_isPausedForScrubbing : 1;
123 }; 130 };
124 131
125 DEFINE_ELEMENT_TYPE_CASTS(MediaControls, isMediaControls()); 132 DEFINE_ELEMENT_TYPE_CASTS(MediaControls, isMediaControls());
126 133
127 } 134 }
128 135
129 #endif 136 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698