| OLD | NEW |
| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 | 77 |
| 78 // MediaControls implementation. | 78 // MediaControls implementation. |
| 79 void Show() override; | 79 void Show() override; |
| 80 void Hide() override; | 80 void Hide() override; |
| 81 void Reset() override; | 81 void Reset() override; |
| 82 void OnControlsListUpdated() override; | 82 void OnControlsListUpdated() override; |
| 83 // TODO(mlamouri): this is temporary to notify the controls that an | 83 // TODO(mlamouri): this is temporary to notify the controls that an |
| 84 // HTMLTrackElement failed to load because there is no web exposed way to | 84 // HTMLTrackElement failed to load because there is no web exposed way to |
| 85 // be notified on the TextTrack object. See https://crbug.com/669977 | 85 // be notified on the TextTrack object. See https://crbug.com/669977 |
| 86 void OnTrackElementFailedToLoad() override { OnTextTracksAddedOrRemoved(); } | 86 void OnTrackElementFailedToLoad() override { OnTextTracksAddedOrRemoved(); } |
| 87 // TODO(mlamouri): the following methods will be able to become private when | |
| 88 // the controls have to modules/ and have access to RemotePlayback. | |
| 89 void OnRemotePlaybackAvailabilityChanged() override { | |
| 90 RefreshCastButtonVisibility(); | |
| 91 } | |
| 92 void OnRemotePlaybackConnecting() override { StartedCasting(); } | |
| 93 void OnRemotePlaybackDisconnected() override { StoppedCasting(); } | |
| 94 // TODO(mlamouri): this method is needed in order to notify the controls that | 87 // TODO(mlamouri): this method is needed in order to notify the controls that |
| 95 // the attribute have changed. | 88 // the attribute have changed. |
| 96 void OnDisableRemotePlaybackAttributeChanged() override { | 89 void OnDisableRemotePlaybackAttributeChanged() override { |
| 97 RefreshCastButtonVisibility(); | 90 RefreshCastButtonVisibility(); |
| 98 } | 91 } |
| 99 // Notify us that the media element's network state has changed. | 92 // Notify us that the media element's network state has changed. |
| 100 void NetworkStateChanged() override; | 93 void NetworkStateChanged() override; |
| 101 LayoutObject* PanelLayoutObject() override; | 94 LayoutObject* PanelLayoutObject() override; |
| 102 LayoutObject* ContainerLayoutObject() override; | 95 LayoutObject* ContainerLayoutObject() override; |
| 103 // Return the internal elements, which is used by registering clicking | 96 // Return the internal elements, which is used by registering clicking |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 // current. | 185 // current. |
| 193 void ComputeWhichControlsFit(); | 186 void ComputeWhichControlsFit(); |
| 194 | 187 |
| 195 // Node | 188 // Node |
| 196 bool IsMediaControls() const override { return true; } | 189 bool IsMediaControls() const override { return true; } |
| 197 bool WillRespondToMouseMoveEvents() override { return true; } | 190 bool WillRespondToMouseMoveEvents() override { return true; } |
| 198 void DefaultEventHandler(Event*) override; | 191 void DefaultEventHandler(Event*) override; |
| 199 bool ContainsRelatedTarget(Event*); | 192 bool ContainsRelatedTarget(Event*); |
| 200 | 193 |
| 201 // Internal cast related methods. | 194 // Internal cast related methods. |
| 202 void StartedCasting(); | |
| 203 void StoppedCasting(); | |
| 204 void RefreshCastButtonVisibility(); | 195 void RefreshCastButtonVisibility(); |
| 205 void RefreshCastButtonVisibilityWithoutUpdate(); | 196 void RefreshCastButtonVisibilityWithoutUpdate(); |
| 206 | 197 |
| 207 // Methods called by MediaControlsMediaEventListener. | 198 // Methods called by MediaControlsMediaEventListener. |
| 208 void OnVolumeChange(); | 199 void OnVolumeChange(); |
| 209 void OnFocusIn(); | 200 void OnFocusIn(); |
| 210 void OnTimeUpdate(); | 201 void OnTimeUpdate(); |
| 211 void OnDurationChange(); | 202 void OnDurationChange(); |
| 212 void OnPlay(); | 203 void OnPlay(); |
| 213 void OnPlaying(); | 204 void OnPlaying(); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 IntSize size_; | 250 IntSize size_; |
| 260 | 251 |
| 261 bool keep_showing_until_timer_fires_ : 1; | 252 bool keep_showing_until_timer_fires_ : 1; |
| 262 }; | 253 }; |
| 263 | 254 |
| 264 DEFINE_ELEMENT_TYPE_CASTS(MediaControlsImpl, IsMediaControls()); | 255 DEFINE_ELEMENT_TYPE_CASTS(MediaControlsImpl, IsMediaControls()); |
| 265 | 256 |
| 266 } // namespace blink | 257 } // namespace blink |
| 267 | 258 |
| 268 #endif | 259 #endif |
| OLD | NEW |