OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 m_overlayEnclosure = overlayEnclosure.get(); | 52 m_overlayEnclosure = overlayEnclosure.get(); |
53 appendChild(overlayEnclosure.release(), exceptionState); | 53 appendChild(overlayEnclosure.release(), exceptionState); |
54 if (exceptionState.hadException()) | 54 if (exceptionState.hadException()) |
55 return false; | 55 return false; |
56 | 56 |
57 return MediaControls::initializeControls(document); | 57 return MediaControls::initializeControls(document); |
58 } | 58 } |
59 | 59 |
60 void MediaControlsAndroid::setMediaController(MediaControllerInterface* controll
er) | 60 void MediaControlsAndroid::setMediaController(MediaControllerInterface* controll
er) |
61 { | 61 { |
62 if (m_overlayPlayButton) | 62 m_overlayPlayButton->setMediaController(controller); |
63 m_overlayPlayButton->setMediaController(controller); | 63 m_overlayEnclosure->setMediaController(controller); |
64 if (m_overlayEnclosure) | |
65 m_overlayEnclosure->setMediaController(controller); | |
66 MediaControls::setMediaController(controller); | 64 MediaControls::setMediaController(controller); |
67 } | 65 } |
68 | 66 |
69 void MediaControlsAndroid::playbackStarted() | 67 void MediaControlsAndroid::playbackStarted() |
70 { | 68 { |
71 m_overlayPlayButton->updateDisplayType(); | 69 m_overlayPlayButton->updateDisplayType(); |
72 MediaControls::playbackStarted(); | 70 MediaControls::playbackStarted(); |
73 } | 71 } |
74 | 72 |
75 void MediaControlsAndroid::playbackStopped() | 73 void MediaControlsAndroid::playbackStopped() |
76 { | 74 { |
77 m_overlayPlayButton->updateDisplayType(); | 75 m_overlayPlayButton->updateDisplayType(); |
78 MediaControls::playbackStopped(); | 76 MediaControls::playbackStopped(); |
79 } | 77 } |
80 | 78 |
81 void MediaControlsAndroid::insertTextTrackContainer(PassRefPtr<MediaControlTextT
rackContainerElement> textTrackContainer) | 79 void MediaControlsAndroid::insertTextTrackContainer(PassRefPtr<MediaControlTextT
rackContainerElement> textTrackContainer) |
82 { | 80 { |
83 // Insert it before the overlay play button so it always displays behind it. | 81 // Insert it before the overlay play button so it always displays behind it. |
84 m_overlayEnclosure->insertBefore(textTrackContainer, m_overlayPlayButton); | 82 m_overlayEnclosure->insertBefore(textTrackContainer, m_overlayPlayButton); |
85 } | 83 } |
86 } | 84 } |
OLD | NEW |