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

Side by Side Diff: Source/core/html/shadow/MediaControlsAndroid.cpp

Issue 182383006: Remove unfailable null checks in MediaControls (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 9 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 | « Source/core/html/shadow/MediaControls.cpp ('k') | no next file » | 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) 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
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 }
OLDNEW
« no previous file with comments | « Source/core/html/shadow/MediaControls.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698